tor-browser

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

External.h (1137B)


      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 mozilla_dom_External_h
      8 #define mozilla_dom_External_h
      9 
     10 #include "mozilla/dom/ExternalBinding.h"
     11 #include "nsCycleCollectionParticipant.h"
     12 #include "nsWrapperCache.h"
     13 
     14 namespace mozilla::dom {
     15 
     16 class External : public nsWrapperCache {
     17 public:
     18  NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(External)
     19  NS_DECL_CYCLE_COLLECTION_NATIVE_WRAPPERCACHE_CLASS(External)
     20 
     21  explicit External(nsISupports* aParent) : mParent(aParent) {}
     22 
     23  nsISupports* GetParentObject() const { return mParent; }
     24  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
     25 
     26  void AddSearchProvider() {}
     27  void IsSearchProviderInstalled() {}
     28 
     29 protected:
     30  virtual ~External() = default;
     31 
     32 private:
     33  nsCOMPtr<nsISupports> mParent;
     34 };
     35 
     36 }  // namespace mozilla::dom
     37 
     38 #endif  // mozilla_dom_External_h