LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom - SecureElementManagerBinding.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 8 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 11 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* THIS FILE IS AUTOGENERATED FROM SecureElementManager.webidl BY Codegen.py - DO NOT EDIT */
       2             : 
       3             : #ifndef mozilla_dom_SecureElementManagerBinding_h
       4             : #define mozilla_dom_SecureElementManagerBinding_h
       5             : 
       6             : #include "js/RootingAPI.h"
       7             : #include "jspubtd.h"
       8             : #include "mozilla/ErrorResult.h"
       9             : #include "mozilla/dom/BindingDeclarations.h"
      10             : #include "mozilla/dom/CallbackInterface.h"
      11             : #include "mozilla/dom/Nullable.h"
      12             : #include "mozilla/dom/ToJSValue.h"
      13             : #include "nsWeakReference.h"
      14             : 
      15             : namespace mozilla {
      16             : namespace dom {
      17             : 
      18             : struct NativePropertyHooks;
      19             : class Promise;
      20             : class ProtoAndIfaceCache;
      21             : class SEManager;
      22             : struct SEManagerAtoms;
      23             : 
      24             : } // namespace dom
      25             : } // namespace mozilla
      26             : 
      27             : namespace mozilla {
      28             : namespace dom {
      29             : 
      30             : namespace SEManagerBinding {
      31             : 
      32             :   typedef mozilla::dom::SEManager NativeType;
      33             : 
      34             :   already_AddRefed<SEManager>
      35             :   ConstructNavigatorObject(JSContext* cx, JS::Handle<JSObject*> obj, ErrorResult& aRv);
      36             : 
      37             :   bool
      38             :   ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
      39             : 
      40             :   const JSClass*
      41             :   GetJSClass();
      42             : 
      43             :   bool
      44             :   Wrap(JSContext* aCx, mozilla::dom::SEManager* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
      45             : 
      46             :   template <class T>
      47           0 :   inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
      48             :   {
      49           0 :     JS::Rooted<JSObject*> reflector(aCx);
      50           0 :     return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
      51             :   }
      52             : 
      53             :   // We declare this as an array so that retrieving a pointer to this
      54             :   // binding's property hooks only requires compile/link-time resolvable
      55             :   // address arithmetic.  Declaring it as a pointer instead would require
      56             :   // doing a run-time load to fetch a pointer to this binding's property
      57             :   // hooks.  And then structures which embedded a pointer to this structure
      58             :   // would require a run-time load for proper initialization, which would
      59             :   // then induce static constructors.  Lots of static constructors.
      60             :   extern const NativePropertyHooks sNativePropertyHooks[];
      61             : 
      62             :   void
      63             :   CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
      64             : 
      65             :   JS::Handle<JSObject*>
      66             :   GetProtoObjectHandle(JSContext* aCx);
      67             : 
      68             : } // namespace SEManagerBinding
      69             : 
      70             : 
      71             : 
      72           0 : class SEManagerJSImpl : public CallbackInterface
      73             : {
      74             : public:
      75           0 :   explicit inline SEManagerJSImpl(JSContext* aCx, JS::Handle<JSObject*> aCallback, nsIGlobalObject* aIncumbentGlobal)
      76           0 :     : CallbackInterface(aCx, aCallback, aIncumbentGlobal)
      77             :   {
      78           0 :   }
      79             : 
      80             :   explicit inline SEManagerJSImpl(JS::Handle<JSObject*> aCallback, const FastCallbackConstructor& )
      81             :     : CallbackInterface(aCallback, FastCallbackConstructor())
      82             :   {
      83             :   }
      84             : 
      85             :   explicit inline SEManagerJSImpl(JS::Handle<JSObject*> aCallback, JS::Handle<JSObject*> aAsyncStack, nsIGlobalObject* aIncumbentGlobal)
      86             :     : CallbackInterface(aCallback, aAsyncStack, aIncumbentGlobal)
      87             :   {
      88             :   }
      89             : 
      90             :   already_AddRefed<Promise> GetSEReaders(ErrorResult& aRv, JSCompartment* aCompartment = nullptr);
      91             : 
      92             :   inline bool
      93             :   operator==(const SEManagerJSImpl& aOther) const
      94             :   {
      95             :     return CallbackInterface::operator==(aOther);
      96             :   }
      97             : 
      98             : private:
      99             :   static bool
     100             :   InitIds(JSContext* cx, SEManagerAtoms* atomsCache);
     101             : };
     102             : 
     103             : 
     104             : class SEManager final : public nsSupportsWeakReference,
     105             :                         public nsWrapperCache
     106             : {
     107             : public:
     108             :   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
     109           0 :   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SEManager)
     110             : 
     111             : private:
     112             :   RefPtr<SEManagerJSImpl> mImpl;
     113             :   nsCOMPtr<nsISupports> mParent;
     114             : 
     115             : public:
     116             :   SEManager(JS::Handle<JSObject*> aJSImplObject, nsIGlobalObject* aParent);
     117             : 
     118             : private:
     119             :   ~SEManager();
     120             : 
     121             : public:
     122             :   nsISupports* GetParentObject() const;
     123             : 
     124             :   virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
     125             : 
     126             :   // Return a raw pointer here to avoid refcounting, but make sure it's safe (the object should be kept alive by the callee).
     127             :   already_AddRefed<Promise> GetSEReaders(ErrorResult& aRv, JSCompartment* aCompartment = nullptr);
     128             : 
     129             :   static bool
     130             :   _Create(JSContext* cx, unsigned argc, JS::Value* vp);
     131             : };
     132             : 
     133             : 
     134             : } // namespace dom
     135             : } // namespace mozilla
     136             : 
     137             : #endif // mozilla_dom_SecureElementManagerBinding_h

Generated by: LCOV version 1.13