Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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 nsStylesheetTxns_h__
7 #define nsStylesheetTxns_h__
9 #include "EditTxn.h" // for EditTxn, NS_DECL_EDITTXN
10 #include "nsAutoPtr.h" // for nsRefPtr
11 #include "nsCSSStyleSheet.h" // for nsCSSStyleSheet
12 #include "nsCycleCollectionParticipant.h"
13 #include "nsID.h" // for REFNSIID
14 #include "nsISupportsImpl.h" // for nsCSSStyleSheet::Release
15 #include "nscore.h" // for NS_IMETHOD
17 class nsIEditor;
19 class AddStyleSheetTxn : public EditTxn
20 {
21 public:
22 /** Initialize the transaction.
23 * @param aEditor the object providing core editing operations
24 * @param aSheet the stylesheet to add
25 */
26 NS_IMETHOD Init(nsIEditor *aEditor,
27 nsCSSStyleSheet *aSheet);
29 AddStyleSheetTxn();
31 NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(AddStyleSheetTxn, EditTxn)
32 NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
34 NS_DECL_EDITTXN
36 protected:
38 nsIEditor* mEditor; // the editor that created this transaction
39 nsRefPtr<nsCSSStyleSheet> mSheet; // the style sheet to add
41 };
44 class RemoveStyleSheetTxn : public EditTxn
45 {
46 public:
47 /** Initialize the transaction.
48 * @param aEditor the object providing core editing operations
49 * @param aSheet the stylesheet to remove
50 */
51 NS_IMETHOD Init(nsIEditor *aEditor,
52 nsCSSStyleSheet *aSheet);
54 RemoveStyleSheetTxn();
56 NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(RemoveStyleSheetTxn, EditTxn)
57 NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
59 NS_DECL_EDITTXN
61 protected:
63 nsIEditor* mEditor; // the editor that created this transaction
64 nsRefPtr<nsCSSStyleSheet> mSheet; // the style sheet to remove
66 };
69 #endif /* nsStylesheetTxns_h__ */