Bug 1850713: remove duplicated setting of early hint preloader id in `ScriptLoader...
[gecko.git] / dom / base / External.h
blob9ddda47785d810ddcb7dba0b1c14b42c9c2d5c88
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/. */
7 #ifndef mozilla_dom_External_h
8 #define mozilla_dom_External_h
10 #include "nsCycleCollectionParticipant.h"
11 #include "nsWrapperCache.h"
13 #include "mozilla/dom/ExternalBinding.h"
15 namespace mozilla::dom {
17 class External : public nsWrapperCache {
18 public:
19 NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(External)
20 NS_DECL_CYCLE_COLLECTION_NATIVE_WRAPPERCACHE_CLASS(External)
22 explicit External(nsISupports* aParent) : mParent(aParent) {}
24 nsISupports* GetParentObject() const { return mParent; }
25 JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
27 void AddSearchProvider() {}
28 void IsSearchProviderInstalled() {}
30 protected:
31 virtual ~External() = default;
33 private:
34 nsCOMPtr<nsISupports> mParent;
37 } // namespace mozilla::dom
39 #endif // mozilla_dom_External_h