// Copyright 2016 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef EXTENSIONS_RENDERER_BINDINGS_API_BINDING_H_ #define EXTENSIONS_RENDERER_BINDINGS_API_BINDING_H_ #include <map> #include <memory> #include <string> #include "base/containers/flat_set.h" #include "base/functional/callback.h" #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" #include "base/values.h" #include "extensions/renderer/bindings/argument_spec.h" #include "v8/include/v8.h" namespace gin { class Arguments; } namespace extensions { class APIBindingHooks; class APIEventHandler; class APIRequestHandler; class APISignature; class APITypeReferenceMap; class BindingAccessChecker; namespace binding { enum class RequestThread; } // A class that vends v8::Objects for extension APIs. These APIs have function // interceptors for all exposed methods, which call back into the APIBinding. // The APIBinding then matches the calling arguments against an expected method // signature, throwing an error if they don't match. // There should only need to be a single APIBinding object for each API, and // each can vend multiple v8::Objects for different contexts. // This object is designed to be one-per-isolate, but used across separate // contexts. class APIBinding { … }; } // namespace extensions #endif // EXTENSIONS_RENDERER_BINDINGS_API_BINDING_H_