#include "extensions/renderer/object_backed_native_handler.h"
#include <stddef.h>
#include <utility>
#include "base/logging.h"
#include "content/public/renderer/worker_thread.h"
#include "extensions/common/extension_api.h"
#include "extensions/renderer/console.h"
#include "extensions/renderer/module_system.h"
#include "extensions/renderer/script_context.h"
#include "extensions/renderer/script_context_set.h"
#include "extensions/renderer/v8_helpers.h"
#include "third_party/blink/public/web/web_local_frame.h"
#include "v8/include/v8-context.h"
#include "v8/include/v8-external.h"
#include "v8/include/v8-function-callback.h"
#include "v8/include/v8-isolate.h"
#include "v8/include/v8-object.h"
#include "v8/include/v8-primitive.h"
#include "v8/include/v8-template.h"
#include "v8/include/v8-value.h"
namespace extensions {
namespace {
const char kHandlerFunction[] = …;
const char kFeatureName[] = …;
}
ObjectBackedNativeHandler::ObjectBackedNativeHandler(ScriptContext* context)
: … { … }
ObjectBackedNativeHandler::~ObjectBackedNativeHandler() { … }
void ObjectBackedNativeHandler::Initialize() { … }
bool ObjectBackedNativeHandler::IsInitialized() { … }
v8::Local<v8::Object> ObjectBackedNativeHandler::NewInstance() { … }
void ObjectBackedNativeHandler::Router(
const v8::FunctionCallbackInfo<v8::Value>& args) { … }
void ObjectBackedNativeHandler::RouteHandlerFunction(
const std::string& name,
HandlerFunction handler_function) { … }
void ObjectBackedNativeHandler::RouteHandlerFunction(
const std::string& name,
const std::string& feature_name,
HandlerFunction handler_function) { … }
v8::Isolate* ObjectBackedNativeHandler::GetIsolate() const { … }
void ObjectBackedNativeHandler::Invalidate() { … }
bool ObjectBackedNativeHandler::ContextCanAccessObject(
const v8::Local<v8::Context>& context,
const v8::Local<v8::Object>& object,
bool allow_null_context) { … }
bool ObjectBackedNativeHandler::SetPrivate(v8::Local<v8::Object> obj,
const char* key,
v8::Local<v8::Value> value) { … }
bool ObjectBackedNativeHandler::SetPrivate(v8::Local<v8::Context> context,
v8::Local<v8::Object> obj,
const char* key,
v8::Local<v8::Value> value) { … }
bool ObjectBackedNativeHandler::GetPrivate(v8::Local<v8::Object> obj,
const char* key,
v8::Local<v8::Value>* result) { … }
bool ObjectBackedNativeHandler::GetPrivate(v8::Local<v8::Context> context,
v8::Local<v8::Object> obj,
const char* key,
v8::Local<v8::Value>* result) { … }
void ObjectBackedNativeHandler::DeletePrivate(v8::Local<v8::Object> obj,
const char* key) { … }
void ObjectBackedNativeHandler::DeletePrivate(v8::Local<v8::Context> context,
v8::Local<v8::Object> obj,
const char* key) { … }
}