#include "extensions/renderer/extension_interaction_provider.h"
#include "base/feature_list.h"
#include "base/memory/ptr_util.h"
#include "content/public/common/content_features.h"
#include "extensions/renderer/bindings/get_per_context_data.h"
#include "extensions/renderer/get_script_context.h"
#include "extensions/renderer/script_context.h"
#include "extensions/renderer/worker_thread_util.h"
#include "third_party/blink/public/web/web_local_frame.h"
namespace extensions {
namespace {
struct ExtensionInteractionData : public base::SupportsUserData::Data { … };
constexpr char ExtensionInteractionData::kPerContextDataKey[];
}
ExtensionInteractionProvider::Token::Token(bool for_worker)
: … { … }
ExtensionInteractionProvider::Token::~Token() = default;
ExtensionInteractionProvider::Scope::Scope() = default;
ExtensionInteractionProvider::Scope::~Scope() = default;
std::unique_ptr<ExtensionInteractionProvider::Scope>
ExtensionInteractionProvider::Scope::ForWorker(
v8::Local<v8::Context> v8_context) { … }
std::unique_ptr<ExtensionInteractionProvider::Scope>
ExtensionInteractionProvider::Scope::ForToken(
v8::Local<v8::Context> v8_context,
std::unique_ptr<InteractionProvider::Token> token) { … }
ExtensionInteractionProvider::Scope::ScopedWorkerInteraction::
ScopedWorkerInteraction(v8::Local<v8::Context> v8_context,
bool created_from_token)
: … { … }
ExtensionInteractionProvider::Scope::ScopedWorkerInteraction::
~ScopedWorkerInteraction() { … }
ExtensionInteractionProvider::ExtensionInteractionProvider() = default;
ExtensionInteractionProvider::~ExtensionInteractionProvider() = default;
bool ExtensionInteractionProvider::HasActiveExtensionInteraction(
v8::Local<v8::Context> v8_context) { … }
std::unique_ptr<InteractionProvider::Token>
ExtensionInteractionProvider::GetCurrentToken(
v8::Local<v8::Context> v8_context) const { … }
std::unique_ptr<InteractionProvider::Scope>
ExtensionInteractionProvider::CreateScopedInteraction(
v8::Local<v8::Context> v8_context,
std::unique_ptr<InteractionProvider::Token> token) const { … }
bool ExtensionInteractionProvider::HasActiveInteraction(
v8::Local<v8::Context> v8_context) const { … }
}