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.
|
|
|
|
|
2020-02-04 20:19:40 +00:00
|
|
|
#ifndef SHELL_RENDERER_API_ELECTRON_API_CONTEXT_BRIDGE_H_
|
|
|
|
#define SHELL_RENDERER_API_ELECTRON_API_CONTEXT_BRIDGE_H_
|
2019-10-18 19:57:09 +00:00
|
|
|
|
2020-03-04 07:18:22 +00:00
|
|
|
#include "shell/renderer/api/context_bridge/object_cache.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 {
|
2020-03-04 07:18:22 +00:00
|
|
|
class RenderFrameFunctionStore;
|
2019-10-31 07:56:00 +00:00
|
|
|
}
|
|
|
|
|
2019-10-18 19:57:09 +00:00
|
|
|
v8::Local<v8::Value> ProxyFunctionWrapper(
|
2020-03-04 07:18:22 +00:00
|
|
|
context_bridge::RenderFrameFunctionStore* store,
|
2019-10-18 19:57:09 +00:00
|
|
|
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,
|
2020-03-04 07:18:22 +00:00
|
|
|
context_bridge::RenderFrameFunctionStore* store,
|
|
|
|
context_bridge::ObjectCache* object_cache,
|
2019-10-18 19:57:09 +00:00
|
|
|
int recursion_depth);
|
|
|
|
|
|
|
|
} // namespace api
|
|
|
|
|
|
|
|
} // namespace electron
|
|
|
|
|
2020-02-04 20:19:40 +00:00
|
|
|
#endif // SHELL_RENDERER_API_ELECTRON_API_CONTEXT_BRIDGE_H_
|