Bug 1247796. Use keyboardFocusIndicatorColor for ActiveBorder system color keyword...
[gecko.git] / editor / libeditor / SetDocTitleTxn.h
blob88cfe3de6deb0228e12348444f336b698a129b4f
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef SetDocTitleTxn_h__
7 #define SetDocTitleTxn_h__
9 #include "EditTxn.h" // for EditTxn, NS_DECL_EDITTXN
10 #include "nsString.h" // for nsString
11 #include "nscore.h" // for NS_IMETHOD, nsAString, etc
13 class nsIHTMLEditor;
15 /**
16 * A transaction that changes the document's title,
17 * which is a text node under the <title> tag in a page's <head> section
18 * provides default concrete behavior for all nsITransaction methods.
20 class SetDocTitleTxn : public EditTxn
22 public:
23 /** Initialize the transaction.
24 * @param aEditor the object providing core editing operations
25 * @param aValue the new value for document title
27 NS_IMETHOD Init(nsIHTMLEditor *aEditor,
28 const nsAString *aValue);
29 SetDocTitleTxn();
30 private:
31 nsresult SetDomTitle(const nsAString& aTitle);
33 public:
34 NS_DECL_EDITTXN
36 NS_IMETHOD RedoTransaction() override;
37 NS_IMETHOD GetIsTransient(bool *aIsTransient) override;
39 protected:
41 /** the editor that created this transaction */
42 nsIHTMLEditor* mEditor;
44 /** The new title string */
45 nsString mValue;
47 /** The previous title string to use for undo */
48 nsString mUndoValue;
50 /** Set true if we dont' really change the title during Do() */
51 bool mIsTransient;
54 #endif