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
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
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
);
31 nsresult
SetDomTitle(const nsAString
& aTitle
);
36 NS_IMETHOD
RedoTransaction() override
;
37 NS_IMETHOD
GetIsTransient(bool *aIsTransient
) override
;
41 /** the editor that created this transaction */
42 nsIHTMLEditor
* mEditor
;
44 /** The new title string */
47 /** The previous title string to use for undo */
50 /** Set true if we dont' really change the title during Do() */