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

          Line data    Source code
       1             : /* THIS FILE IS AUTOGENERATED FROM BrowserElement.webidl BY Codegen.py - DO NOT EDIT */
       2             : 
       3             : #ifndef mozilla_dom_BrowserElementBinding_h
       4             : #define mozilla_dom_BrowserElementBinding_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/CallbackFunction.h"
      11             : #include "mozilla/dom/Nullable.h"
      12             : #include "mozilla/dom/ToJSValue.h"
      13             : 
      14             : namespace mozilla {
      15             : namespace dom {
      16             : 
      17             : struct BrowserElementDownloadOptionsAtoms;
      18             : struct BrowserElementExecuteScriptOptionsAtoms;
      19             : class BrowserElementNextPaintEventCallback;
      20             : struct NativePropertyHooks;
      21             : class ProtoAndIfaceCache;
      22             : 
      23             : } // namespace dom
      24             : } // namespace mozilla
      25             : 
      26             : namespace mozilla {
      27             : namespace dom {
      28             : 
      29             : enum class BrowserFindCaseSensitivity : uint8_t {
      30             :   Case_sensitive,
      31             :   Case_insensitive,
      32             :   EndGuard_
      33             : };
      34             : 
      35             : namespace BrowserFindCaseSensitivityValues {
      36             : extern const EnumEntry strings[3];
      37             : } // namespace BrowserFindCaseSensitivityValues
      38             : 
      39             : bool
      40             : ToJSValue(JSContext* aCx, BrowserFindCaseSensitivity aArgument, JS::MutableHandle<JS::Value> aValue);
      41             : 
      42             : 
      43             : enum class BrowserFindDirection : uint8_t {
      44             :   Forward,
      45             :   Backward,
      46             :   EndGuard_
      47             : };
      48             : 
      49             : namespace BrowserFindDirectionValues {
      50             : extern const EnumEntry strings[3];
      51             : } // namespace BrowserFindDirectionValues
      52             : 
      53             : bool
      54             : ToJSValue(JSContext* aCx, BrowserFindDirection aArgument, JS::MutableHandle<JS::Value> aValue);
      55             : 
      56             : 
      57           0 : struct BrowserElementDownloadOptions : public DictionaryBase
      58             : {
      59             :   MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mFilename;
      60             :   MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mReferrer;
      61             : 
      62             :   BrowserElementDownloadOptions();
      63             : 
      64           0 :   explicit inline BrowserElementDownloadOptions(const FastDictionaryInitializer& )
      65           0 :   {
      66             :     // Do nothing here; this is used by our "Fast" subclass
      67           0 :   }
      68             : 
      69             :   explicit inline BrowserElementDownloadOptions(const BrowserElementDownloadOptions& aOther)
      70             :   {
      71             :     *this = aOther;
      72             :   }
      73             : 
      74             :   bool
      75             :   Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
      76             : 
      77             :   bool
      78             :   Init(const nsAString& aJSON);
      79             : 
      80             :   bool
      81             :   ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
      82             : 
      83             :   bool
      84             :   ToJSON(nsAString& aJSON) const;
      85             : 
      86             :   void
      87             :   TraceDictionary(JSTracer* trc);
      88             : 
      89             :   BrowserElementDownloadOptions&
      90             :   operator=(const BrowserElementDownloadOptions& aOther);
      91             : 
      92             : private:
      93             :   static bool
      94             :   InitIds(JSContext* cx, BrowserElementDownloadOptionsAtoms* atomsCache);
      95             : };
      96             : 
      97             : namespace binding_detail {
      98           0 : struct FastBrowserElementDownloadOptions : public BrowserElementDownloadOptions
      99             : {
     100           0 :   inline FastBrowserElementDownloadOptions()
     101           0 :     : BrowserElementDownloadOptions(FastDictionaryInitializer())
     102             :   {
     103             :     // Doesn't matter what int we pass to the parent constructor
     104           0 :   }
     105             : };
     106             : } // namespace binding_detail
     107             : 
     108             : 
     109           0 : struct BrowserElementExecuteScriptOptions : public DictionaryBase
     110             : {
     111             :   MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mOrigin;
     112             :   MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mUrl;
     113             : 
     114             :   BrowserElementExecuteScriptOptions();
     115             : 
     116           0 :   explicit inline BrowserElementExecuteScriptOptions(const FastDictionaryInitializer& )
     117           0 :   {
     118             :     // Do nothing here; this is used by our "Fast" subclass
     119           0 :   }
     120             : 
     121             :   explicit inline BrowserElementExecuteScriptOptions(const BrowserElementExecuteScriptOptions& aOther)
     122             :   {
     123             :     *this = aOther;
     124             :   }
     125             : 
     126             :   bool
     127             :   Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
     128             : 
     129             :   bool
     130             :   Init(const nsAString& aJSON);
     131             : 
     132             :   bool
     133             :   ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
     134             : 
     135             :   bool
     136             :   ToJSON(nsAString& aJSON) const;
     137             : 
     138             :   void
     139             :   TraceDictionary(JSTracer* trc);
     140             : 
     141             :   BrowserElementExecuteScriptOptions&
     142             :   operator=(const BrowserElementExecuteScriptOptions& aOther);
     143             : 
     144             : private:
     145             :   static bool
     146             :   InitIds(JSContext* cx, BrowserElementExecuteScriptOptionsAtoms* atomsCache);
     147             : };
     148             : 
     149             : namespace binding_detail {
     150           0 : struct FastBrowserElementExecuteScriptOptions : public BrowserElementExecuteScriptOptions
     151             : {
     152           0 :   inline FastBrowserElementExecuteScriptOptions()
     153           0 :     : BrowserElementExecuteScriptOptions(FastDictionaryInitializer())
     154             :   {
     155             :     // Doesn't matter what int we pass to the parent constructor
     156           0 :   }
     157             : };
     158             : } // namespace binding_detail
     159             : 
     160             : 
     161           0 : class BrowserElementNextPaintEventCallback : public CallbackFunction
     162             : {
     163             : public:
     164             :   explicit inline BrowserElementNextPaintEventCallback(JSContext* aCx, JS::Handle<JSObject*> aCallback, nsIGlobalObject* aIncumbentGlobal)
     165             :     : CallbackFunction(aCx, aCallback, aIncumbentGlobal)
     166             :   {
     167             :     MOZ_ASSERT(JS::IsCallable(mCallback));
     168             :   }
     169             : 
     170           0 :   explicit inline BrowserElementNextPaintEventCallback(JS::Handle<JSObject*> aCallback, const FastCallbackConstructor& )
     171           0 :     : CallbackFunction(aCallback, FastCallbackConstructor())
     172             :   {
     173           0 :     MOZ_ASSERT(JS::IsCallable(mCallback));
     174           0 :   }
     175             : 
     176             :   explicit inline BrowserElementNextPaintEventCallback(JS::Handle<JSObject*> aCallback, JS::Handle<JSObject*> aAsyncStack, nsIGlobalObject* aIncumbentGlobal)
     177             :     : CallbackFunction(aCallback, aAsyncStack, aIncumbentGlobal)
     178             :   {
     179             :     MOZ_ASSERT(JS::IsCallable(mCallback));
     180             :   }
     181             : 
     182             :   explicit inline BrowserElementNextPaintEventCallback(CallbackFunction* aOther)
     183             :     : CallbackFunction(aOther)
     184             :   {
     185             :   }
     186             : 
     187             :   template <typename T>
     188             :   inline void
     189             :   Call(const T& thisVal, ErrorResult& aRv, const char* aExecutionReason = nullptr, ExceptionHandling aExceptionHandling = eReportExceptions, JSCompartment* aCompartment = nullptr)
     190             :   {
     191             :     MOZ_ASSERT(!aRv.Failed(), "Don't pass an already-failed ErrorResult to a callback!");
     192             :     if (!aExecutionReason) {
     193             :       aExecutionReason = "BrowserElementNextPaintEventCallback";
     194             :     }
     195             :     CallSetup s(this, aRv, aExecutionReason, aExceptionHandling, aCompartment);
     196             :     if (!s.GetContext()) {
     197             :       MOZ_ASSERT(aRv.Failed());
     198             :       return;
     199             :     }
     200             :     JS::Rooted<JS::Value> thisValJS(s.GetContext());
     201             :     if (!ToJSValue(s.GetContext(), thisVal, &thisValJS)) {
     202             :       aRv.Throw(NS_ERROR_FAILURE);
     203             :       return;
     204             :     }
     205             :     return Call(s.GetContext(), thisValJS, aRv);
     206             :   }
     207             : 
     208             :   inline void
     209             :   Call(ErrorResult& aRv, const char* aExecutionReason = nullptr, ExceptionHandling aExceptionHandling = eReportExceptions, JSCompartment* aCompartment = nullptr)
     210             :   {
     211             :     MOZ_ASSERT(!aRv.Failed(), "Don't pass an already-failed ErrorResult to a callback!");
     212             :     if (!aExecutionReason) {
     213             :       aExecutionReason = "BrowserElementNextPaintEventCallback";
     214             :     }
     215             :     CallSetup s(this, aRv, aExecutionReason, aExceptionHandling, aCompartment);
     216             :     if (!s.GetContext()) {
     217             :       MOZ_ASSERT(aRv.Failed());
     218             :       return;
     219             :     }
     220             :     return Call(s.GetContext(), JS::UndefinedHandleValue, aRv);
     221             :   }
     222             : 
     223             :   template <typename T>
     224             :   inline void
     225             :   Call(const T& thisVal, const char* aExecutionReason = nullptr)
     226             :   {
     227             :     IgnoredErrorResult rv;
     228             :     return Call(thisVal, rv, aExecutionReason);
     229             :   }
     230             : 
     231             :   inline void
     232             :   Call(const char* aExecutionReason = nullptr)
     233             :   {
     234             :     IgnoredErrorResult rv;
     235             :     return Call(rv, aExecutionReason, eReportExceptions, nullptr);
     236             :   }
     237             : 
     238             :   inline bool
     239             :   operator==(const BrowserElementNextPaintEventCallback& aOther) const
     240             :   {
     241             :     return CallbackFunction::operator==(aOther);
     242             :   }
     243             : 
     244             : private:
     245             :   void Call(JSContext* cx, JS::Handle<JS::Value> aThisVal, ErrorResult& aRv);
     246             : };
     247             : 
     248             : 
     249             : namespace binding_detail {
     250           0 : class FastBrowserElementNextPaintEventCallback : public BrowserElementNextPaintEventCallback
     251             : {
     252             : public:
     253           0 :   explicit inline FastBrowserElementNextPaintEventCallback(JS::Handle<JSObject*> aCallback)
     254           0 :     : BrowserElementNextPaintEventCallback(aCallback, FastCallbackConstructor())
     255             :   {
     256           0 :   }
     257             : 
     258             :   inline void
     259           0 :   Trace(JSTracer* aTracer)
     260             :   {
     261           0 :     BrowserElementNextPaintEventCallback::Trace(aTracer);
     262           0 :   }
     263             : 
     264             :   inline void
     265           0 :   FinishSlowJSInitIfMoreThanOneOwner(JSContext* aCx)
     266             :   {
     267           0 :     BrowserElementNextPaintEventCallback::FinishSlowJSInitIfMoreThanOneOwner(aCx);
     268           0 :   }
     269             : };
     270             : } // namespace binding_detail
     271             : 
     272             : 
     273             : } // namespace dom
     274             : } // namespace mozilla
     275             : 
     276             : #endif // mozilla_dom_BrowserElementBinding_h

Generated by: LCOV version 1.13