LCOV - code coverage report
Current view: top level - xpcom/reflect/xptinfo - ShimInterfaceInfo.h (source / functions) Hit Total Coverage
Test: output.info Lines: 1 1 100.0 %
Date: 2017-07-14 16:53:18 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
       2             :  * vim: set ts=8 sw=4 et tw=78:
       3             :  *
       4             :  * This Source Code Form is subject to the terms of the Mozilla Public
       5             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       6             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
       7             : 
       8             : #ifndef ShimInterfaceInfo_h
       9             : #define ShimInterfaceInfo_h
      10             : 
      11             : #include "mozilla/Attributes.h"
      12             : #include "nsIInterfaceInfo.h"
      13             : #include "nsString.h"
      14             : #include "nsID.h"
      15             : #include "nsTArray.h"
      16             : #include "xptinfo.h"
      17             : #include "nsAutoPtr.h"
      18             : #include "js/RootingAPI.h"
      19             : 
      20             : namespace mozilla {
      21             : namespace dom {
      22             : struct NativePropertyHooks;
      23             : } // namespace dom
      24             : } // namespace mozilla
      25             : 
      26             : class ShimInterfaceInfo final : public nsIInterfaceInfo
      27             : {
      28             : public:
      29             :     NS_DECL_ISUPPORTS
      30             :     NS_DECL_NSIINTERFACEINFO
      31             : 
      32             :     // Construct a ShimInterfaceInfo object if we have a shim available for aName.
      33             :     // Otherwise, returns nullptr.
      34             :     static already_AddRefed<ShimInterfaceInfo>
      35             :     MaybeConstruct(const char* aName, JSContext* cx);
      36             : 
      37             : private:
      38             :     ShimInterfaceInfo(const nsIID& aIID,
      39             :                       const char* aName,
      40             :                       const mozilla::dom::NativePropertyHooks* aNativePropHooks);
      41             : 
      42          66 :     ~ShimInterfaceInfo() {}
      43             : 
      44             : private:
      45             :     nsIID mIID;
      46             :     nsAutoCString mName;
      47             :     const mozilla::dom::NativePropertyHooks* mNativePropHooks;
      48             : };
      49             : 
      50             : #endif

Generated by: LCOV version 1.13