LCOV - code coverage report
Current view: top level - dom/base - nsDOMSerializer.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 11 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 11 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : #ifndef nsDOMSerializer_h_
       8             : #define nsDOMSerializer_h_
       9             : 
      10             : #include "nsIDOMSerializer.h"
      11             : #include "nsWrapperCache.h"
      12             : #include "mozilla/ErrorResult.h"
      13             : #include "mozilla/dom/XMLSerializerBinding.h"
      14             : 
      15             : class nsINode;
      16             : 
      17             : class nsDOMSerializer final : public nsIDOMSerializer,
      18             :                               public nsWrapperCache
      19             : {
      20             : public:
      21             :   nsDOMSerializer();
      22             : 
      23             :   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
      24           0 :   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsDOMSerializer)
      25             : 
      26             :   // nsIDOMSerializer
      27             :   NS_DECL_NSIDOMSERIALIZER
      28             : 
      29             :   // WebIDL API
      30             :   static already_AddRefed<nsDOMSerializer>
      31           0 :   Constructor(const mozilla::dom::GlobalObject& aOwner,
      32             :               mozilla::ErrorResult& rv)
      33             :   {
      34           0 :     RefPtr<nsDOMSerializer> domSerializer = new nsDOMSerializer(aOwner.GetAsSupports());
      35           0 :     return domSerializer.forget();
      36             :   }
      37             : 
      38             :   void
      39             :   SerializeToString(nsINode& aRoot, nsAString& aStr,
      40             :                     mozilla::ErrorResult& rv);
      41             : 
      42             :   void
      43             :   SerializeToStream(nsINode& aRoot, nsIOutputStream* aStream,
      44             :                     const nsAString& aCharset, mozilla::ErrorResult& rv);
      45             : 
      46           0 :   nsISupports* GetParentObject() const
      47             :   {
      48           0 :     return mOwner;
      49             :   }
      50             : 
      51           0 :   virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
      52             :   {
      53           0 :     return mozilla::dom::XMLSerializerBinding::Wrap(aCx, this, aGivenProto);
      54             :   }
      55             : 
      56             : private:
      57             :   virtual ~nsDOMSerializer();
      58             : 
      59           0 :   explicit nsDOMSerializer(nsISupports* aOwner) : mOwner(aOwner)
      60             :   {
      61           0 :     MOZ_ASSERT(aOwner);
      62           0 :   }
      63             : 
      64             :   nsCOMPtr<nsISupports> mOwner;
      65             : };
      66             : 
      67             : 
      68             : #endif
      69             : 

Generated by: LCOV version 1.13