tor-browser

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

nsIDocumentTransformer.h (2000B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 #ifndef nsIDocumentTransformer_h__
      6 #define nsIDocumentTransformer_h__
      7 
      8 #include "nsISupports.h"
      9 #include "nsStringFwd.h"
     10 
     11 template <class>
     12 class nsCOMPtr;
     13 class nsIContent;
     14 class nsINode;
     15 class nsIURI;
     16 template <class>
     17 class nsTArray;
     18 
     19 namespace mozilla {
     20 namespace dom {
     21 class Document;
     22 }
     23 }  // namespace mozilla
     24 
     25 #define NS_ITRANSFORMOBSERVER_IID \
     26  {0x04b2d17c, 0xe98d, 0x45f5, {0x9a, 0x67, 0xb7, 0x01, 0x19, 0x59, 0x7d, 0xe7}}
     27 
     28 class nsITransformObserver : public nsISupports {
     29 public:
     30  NS_INLINE_DECL_STATIC_IID(NS_ITRANSFORMOBSERVER_IID)
     31 
     32  virtual nsresult OnDocumentCreated(
     33      mozilla::dom::Document* aSourceDocument,
     34      mozilla::dom::Document* aResultDocument) = 0;
     35 
     36  virtual nsresult OnTransformDone(mozilla::dom::Document* aSourceDocument,
     37                                   nsresult aResult,
     38                                   mozilla::dom::Document* aResultDocument) = 0;
     39 };
     40 
     41 #define NS_IDOCUMENTTRANSFORMER_IID \
     42  {0xf45e1ff8, 0x50f3, 0x4496, {0xb3, 0xa2, 0x0e, 0x03, 0xe8, 0x4a, 0x57, 0x11}}
     43 
     44 class nsIDocumentTransformer : public nsISupports {
     45 public:
     46  NS_INLINE_DECL_STATIC_IID(NS_IDOCUMENTTRANSFORMER_IID)
     47 
     48  NS_IMETHOD SetTransformObserver(nsITransformObserver* aObserver) = 0;
     49  NS_IMETHOD LoadStyleSheet(nsIURI* aUri,
     50                            mozilla::dom::Document* aLoaderDocument) = 0;
     51  NS_IMETHOD SetSourceContentModel(nsINode* aSource) = 0;
     52  NS_IMETHOD CancelLoads() = 0;
     53 
     54  NS_IMETHOD AddXSLTParamNamespace(const nsString& aPrefix,
     55                                   const nsString& aNamespace) = 0;
     56  NS_IMETHOD AddXSLTParam(const nsString& aName, const nsString& aNamespace,
     57                          const nsString& aValue, const nsString& aSelect,
     58                          nsINode* aContextNode) = 0;
     59 };
     60 
     61 #endif  // nsIDocumentTransformer_h__