chromium/extensions/renderer/native_extension_bindings_system.h

// 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_NATIVE_EXTENSION_BINDINGS_SYSTEM_H_
#define EXTENSIONS_RENDERER_NATIVE_EXTENSION_BINDINGS_SYSTEM_H_

#include <memory>
#include <string>

#include "base/memory/weak_ptr.h"
#include "base/values.h"
#include "extensions/common/extension_id.h"
#include "extensions/common/mojom/event_dispatcher.mojom-forward.h"
#include "extensions/renderer/api/messaging/native_renderer_messaging_service.h"
#include "extensions/renderer/bindings/api_binding_types.h"
#include "extensions/renderer/bindings/api_bindings_system.h"
#include "extensions/renderer/bindings/event_emitter.h"
#include "extensions/renderer/feature_cache.h"
#include "v8/include/v8-forward.h"
#include "v8/include/v8-persistent-handle.h"

namespace extensions {
class IPCMessageSender;
class ScriptContext;
class ScriptContextSetIterable;

// The class responsible for creating extension bindings in different contexts,
// permissions/availability checks, dispatching requests and handling responses,
// and dispatching events to listeners.
// This is designed to be used on a single thread (and for all contexts on that
// thread), but should be safe to use on threads other than the main thread (so
// that worker threads can have extension bindings).
// TODO(devlin): Rename this to be simply "ExtensionBindingsSystem"? There's
// no non-native version, but the rename causes churn and also makes git history
// a bit messy (since there used to be a different ExtensionBindingsSystem).
class NativeExtensionBindingsSystem {};

}  // namespace extensions

#endif  // EXTENSIONS_RENDERER_NATIVE_EXTENSION_BINDINGS_SYSTEM_H_