2001-09-25 01:32:19 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 11:12:37 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2006-03-25 05:47:31 +00:00
|
|
|
|
|
|
|
/* internal interface for observing CSS style sheet loads */
|
|
|
|
|
1999-12-04 01:27:14 +00:00
|
|
|
#ifndef nsICSSLoaderObserver_h___
|
|
|
|
#define nsICSSLoaderObserver_h___
|
|
|
|
|
|
|
|
#include "nsISupports.h"
|
|
|
|
|
|
|
|
#define NS_ICSSLOADEROBSERVER_IID \
|
2010-05-11 20:41:47 +00:00
|
|
|
{ 0x7eb90c74, 0xea0c, 0x4df5, \
|
|
|
|
{0xa1, 0x5f, 0x95, 0xf0, 0x6a, 0x98, 0xb9, 0x40} }
|
1999-12-04 01:27:14 +00:00
|
|
|
|
2010-05-11 20:41:47 +00:00
|
|
|
class nsCSSStyleSheet;
|
2003-01-06 14:55:13 +00:00
|
|
|
|
1999-12-04 01:27:14 +00:00
|
|
|
class nsICSSLoaderObserver : public nsISupports {
|
|
|
|
public:
|
2005-11-11 14:36:26 +00:00
|
|
|
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICSSLOADEROBSERVER_IID)
|
1999-12-04 01:27:14 +00:00
|
|
|
|
2005-09-12 18:41:15 +00:00
|
|
|
/**
|
|
|
|
* StyleSheetLoaded is called after aSheet is marked complete and before any
|
|
|
|
* load events associated with aSheet are fired.
|
2006-11-11 22:27:00 +00:00
|
|
|
* @param aSheet the sheet that was loaded. Guaranteed to always be
|
|
|
|
* non-null, even if aStatus indicates failure.
|
2005-09-12 18:41:15 +00:00
|
|
|
* @param aWasAlternate whether the sheet was an alternate. This will always
|
|
|
|
* match the value LoadStyleLink or LoadInlineStyle returned in
|
|
|
|
* aIsAlternate if one of those methods were used to load the sheet,
|
|
|
|
* and will always be false otherwise.
|
|
|
|
* @param aStatus is a success code if the sheet loaded successfully and a
|
|
|
|
* failure code otherwise. Note that successful load of aSheet
|
|
|
|
* doesn't indicate anything about whether the data actually parsed
|
|
|
|
* as CSS, and doesn't indicate anything about the status of any child
|
|
|
|
* sheets of aSheet.
|
|
|
|
*/
|
2011-09-29 06:19:26 +00:00
|
|
|
NS_IMETHOD StyleSheetLoaded(nsCSSStyleSheet* aSheet, bool aWasAlternate,
|
2005-09-12 18:41:15 +00:00
|
|
|
nsresult aStatus) = 0;
|
1999-12-04 01:27:14 +00:00
|
|
|
};
|
|
|
|
|
2005-11-11 14:36:26 +00:00
|
|
|
NS_DEFINE_STATIC_IID_ACCESSOR(nsICSSLoaderObserver, NS_ICSSLOADEROBSERVER_IID)
|
|
|
|
|
1999-12-04 01:27:14 +00:00
|
|
|
#endif // nsICSSLoaderObserver_h___
|