2019-10-18 19:57:09 +00:00
|
|
|
// Copyright (c) 2019 Slack Technologies, Inc.
|
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef SHELL_RENDERER_API_ATOM_API_CONTEXT_BRIDGE_H_
|
|
|
|
#define SHELL_RENDERER_API_ATOM_API_CONTEXT_BRIDGE_H_
|
|
|
|
|
2019-10-31 07:56:00 +00:00
|
|
|
#include "v8/include/v8.h"
|
|
|
|
|
|
|
|
namespace gin_helper {
|
|
|
|
class Arguments;
|
|
|
|
}
|
2019-10-18 19:57:09 +00:00
|
|
|
|
|
|
|
namespace electron {
|
|
|
|
|
|
|
|
namespace api {
|
|
|
|
|
2019-10-31 07:56:00 +00:00
|
|
|
namespace context_bridge {
|
|
|
|
class RenderFramePersistenceStore;
|
|
|
|
}
|
|
|
|
|
2019-10-18 19:57:09 +00:00
|
|
|
v8::Local<v8::Value> ProxyFunctionWrapper(
|
|
|
|
context_bridge::RenderFramePersistenceStore* store,
|
|
|
|
size_t func_id,
|
2019-10-31 07:56:00 +00:00
|
|
|
gin_helper::Arguments* args);
|
2019-10-18 19:57:09 +00:00
|
|
|
|
|
|
|
v8::MaybeLocal<v8::Object> CreateProxyForAPI(
|
|
|
|
const v8::Local<v8::Object>& api_object,
|
|
|
|
const v8::Local<v8::Context>& source_context,
|
|
|
|
const v8::Local<v8::Context>& target_context,
|
|
|
|
context_bridge::RenderFramePersistenceStore* store,
|
|
|
|
int recursion_depth);
|
|
|
|
|
|
|
|
} // namespace api
|
|
|
|
|
|
|
|
} // namespace electron
|
|
|
|
|
|
|
|
#endif // SHELL_RENDERER_API_ATOM_API_CONTEXT_BRIDGE_H_
|