tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

nsICSSLoaderObserver.h (1683B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
      3 /* This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 /* internal interface for observing CSS style sheet loads */
      8 
      9 #ifndef nsICSSLoaderObserver_h___
     10 #define nsICSSLoaderObserver_h___
     11 
     12 #include "nsISupports.h"
     13 
     14 #define NS_ICSSLOADEROBSERVER_IID \
     15  {0xf51fbf2c, 0xfe4b, 0x4a15, {0xaf, 0x7e, 0x5e, 0x20, 0x64, 0x5f, 0xaf, 0x58}}
     16 
     17 namespace mozilla {
     18 class StyleSheet;
     19 }
     20 
     21 class nsICSSLoaderObserver : public nsISupports {
     22 public:
     23  NS_INLINE_DECL_STATIC_IID(NS_ICSSLOADEROBSERVER_IID)
     24 
     25  /**
     26   * StyleSheetLoaded is called after aSheet is marked complete and before any
     27   * load events associated with aSheet are fired.
     28   * @param aSheet the sheet that was loaded. Guaranteed to always be
     29   *        non-null, even if aStatus indicates failure.
     30   * @param aWasDeferred whether the sheet load was deferred, due to it being an
     31   *        alternate sheet, or having a non-matching media list.
     32   * @param aStatus is a success code if the sheet loaded successfully and a
     33   *        failure code otherwise.  Note that successful load of aSheet
     34   *        doesn't indicate anything about whether the data actually parsed
     35   *        as CSS, and doesn't indicate anything about the status of any child
     36   *        sheets of aSheet.
     37   */
     38  NS_IMETHOD StyleSheetLoaded(mozilla::StyleSheet* aSheet, bool aWasDeferred,
     39                              nsresult aStatus) = 0;
     40 };
     41 
     42 #endif  // nsICSSLoaderObserver_h___