Wed, 31 Dec 2014 06:55:50 +0100
Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | /* internal interface for observing CSS style sheet loads */ |
michael@0 | 7 | |
michael@0 | 8 | #ifndef nsICSSLoaderObserver_h___ |
michael@0 | 9 | #define nsICSSLoaderObserver_h___ |
michael@0 | 10 | |
michael@0 | 11 | #include "nsISupports.h" |
michael@0 | 12 | |
michael@0 | 13 | #define NS_ICSSLOADEROBSERVER_IID \ |
michael@0 | 14 | { 0x7eb90c74, 0xea0c, 0x4df5, \ |
michael@0 | 15 | {0xa1, 0x5f, 0x95, 0xf0, 0x6a, 0x98, 0xb9, 0x40} } |
michael@0 | 16 | |
michael@0 | 17 | class nsCSSStyleSheet; |
michael@0 | 18 | |
michael@0 | 19 | class nsICSSLoaderObserver : public nsISupports { |
michael@0 | 20 | public: |
michael@0 | 21 | NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICSSLOADEROBSERVER_IID) |
michael@0 | 22 | |
michael@0 | 23 | /** |
michael@0 | 24 | * StyleSheetLoaded is called after aSheet is marked complete and before any |
michael@0 | 25 | * load events associated with aSheet are fired. |
michael@0 | 26 | * @param aSheet the sheet that was loaded. Guaranteed to always be |
michael@0 | 27 | * non-null, even if aStatus indicates failure. |
michael@0 | 28 | * @param aWasAlternate whether the sheet was an alternate. This will always |
michael@0 | 29 | * match the value LoadStyleLink or LoadInlineStyle returned in |
michael@0 | 30 | * aIsAlternate if one of those methods were used to load the sheet, |
michael@0 | 31 | * and will always be false otherwise. |
michael@0 | 32 | * @param aStatus is a success code if the sheet loaded successfully and a |
michael@0 | 33 | * failure code otherwise. Note that successful load of aSheet |
michael@0 | 34 | * doesn't indicate anything about whether the data actually parsed |
michael@0 | 35 | * as CSS, and doesn't indicate anything about the status of any child |
michael@0 | 36 | * sheets of aSheet. |
michael@0 | 37 | */ |
michael@0 | 38 | NS_IMETHOD StyleSheetLoaded(nsCSSStyleSheet* aSheet, bool aWasAlternate, |
michael@0 | 39 | nsresult aStatus) = 0; |
michael@0 | 40 | }; |
michael@0 | 41 | |
michael@0 | 42 | NS_DEFINE_STATIC_IID_ACCESSOR(nsICSSLoaderObserver, NS_ICSSLOADEROBSERVER_IID) |
michael@0 | 43 | |
michael@0 | 44 | #endif // nsICSSLoaderObserver_h___ |