Bumping manifests a=b2g-bump
[gecko.git] / editor / libeditor / nsStyleSheetTxns.h
blobdcc58202e8b6815c344d557b88c516637f5c91ea
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 "mozilla/CSSStyleSheet.h" // for mozilla::CSSStyleSheet
12 #include "nsCycleCollectionParticipant.h"
13 #include "nsID.h" // for REFNSIID
14 #include "nsISupportsImpl.h" // for CSSStyleSheet::Release
15 #include "nscore.h" // for NS_IMETHOD
17 class nsIEditor;
19 class AddStyleSheetTxn : public EditTxn
21 public:
22 /** Initialize the transaction.
23 * @param aEditor the object providing core editing operations
24 * @param aSheet the stylesheet to add
26 NS_IMETHOD Init(nsIEditor* aEditor,
27 mozilla::CSSStyleSheet* 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<mozilla::CSSStyleSheet> mSheet; // the style sheet to add
44 class RemoveStyleSheetTxn : public EditTxn
46 public:
47 /** Initialize the transaction.
48 * @param aEditor the object providing core editing operations
49 * @param aSheet the stylesheet to remove
51 NS_IMETHOD Init(nsIEditor* aEditor,
52 mozilla::CSSStyleSheet* 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<mozilla::CSSStyleSheet> mSheet; // the style sheet to remove
69 #endif /* nsStylesheetTxns_h__ */