#include "extensions/renderer/bindings/js_runner.h"
#include "base/supports_user_data.h"
#include "gin/per_context_data.h"
namespace extensions {
namespace {
constexpr char kExtensionJSRunnerPerContextKey[] = …;
struct JSRunnerPerContextData : public base::SupportsUserData::Data { … };
JSRunner* g_instance_for_testing = …;
}
JSRunner* JSRunner::Get(v8::Local<v8::Context> context) { … }
void JSRunner::SetInstanceForContext(v8::Local<v8::Context> context,
std::unique_ptr<JSRunner> js_runner) { … }
void JSRunner::ClearInstanceForContext(v8::Local<v8::Context> context) { … }
void JSRunner::SetInstanceForTesting(JSRunner* js_runner) { … }
JSRunner* JSRunner::GetInstanceForTesting() { … }
void JSRunner::RunJSFunction(v8::Local<v8::Function> function,
v8::Local<v8::Context> context,
int argc,
v8::Local<v8::Value> argv[]) { … }
}