Wed, 31 Dec 2014 06:55:50 +0100
Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2
michael@0 | 1 | /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
michael@0 | 2 | * |
michael@0 | 3 | * This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | #ifndef nsChangeObserver_h_ |
michael@0 | 8 | #define nsChangeObserver_h_ |
michael@0 | 9 | |
michael@0 | 10 | class nsIContent; |
michael@0 | 11 | class nsIDocument; |
michael@0 | 12 | class nsIAtom; |
michael@0 | 13 | |
michael@0 | 14 | #define NS_DECL_CHANGEOBSERVER \ |
michael@0 | 15 | void ObserveAttributeChanged(nsIDocument *aDocument, nsIContent *aContent, nsIAtom *aAttribute); \ |
michael@0 | 16 | void ObserveContentRemoved(nsIDocument *aDocument, nsIContent *aChild, int32_t aIndexInContainer); \ |
michael@0 | 17 | void ObserveContentInserted(nsIDocument *aDocument, nsIContent* aContainer, nsIContent *aChild); |
michael@0 | 18 | |
michael@0 | 19 | // Something that wants to be alerted to changes in attributes or changes in |
michael@0 | 20 | // its corresponding content object. |
michael@0 | 21 | // |
michael@0 | 22 | // This interface is used by our menu code so we only have to have one |
michael@0 | 23 | // nsIDocumentObserver. |
michael@0 | 24 | // |
michael@0 | 25 | // Any class that implements this interface must take care to unregister itself |
michael@0 | 26 | // on deletion. |
michael@0 | 27 | class nsChangeObserver |
michael@0 | 28 | { |
michael@0 | 29 | public: |
michael@0 | 30 | // XXX use dom::Element |
michael@0 | 31 | virtual void ObserveAttributeChanged(nsIDocument* aDocument, |
michael@0 | 32 | nsIContent* aContent, |
michael@0 | 33 | nsIAtom* aAttribute)=0; |
michael@0 | 34 | |
michael@0 | 35 | virtual void ObserveContentRemoved(nsIDocument* aDocument, |
michael@0 | 36 | nsIContent* aChild, |
michael@0 | 37 | int32_t aIndexInContainer)=0; |
michael@0 | 38 | |
michael@0 | 39 | virtual void ObserveContentInserted(nsIDocument* aDocument, |
michael@0 | 40 | nsIContent* aContainer, |
michael@0 | 41 | nsIContent* aChild)=0; |
michael@0 | 42 | }; |
michael@0 | 43 | |
michael@0 | 44 | #endif // nsChangeObserver_h_ |