2016-08-19 11:47:32 +00:00
|
|
|
// Copyright (c) 2016 GitHub, Inc.
|
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef ATOM_RENDERER_ATOM_SANDBOXED_RENDERER_CLIENT_H_
|
|
|
|
#define ATOM_RENDERER_ATOM_SANDBOXED_RENDERER_CLIENT_H_
|
|
|
|
|
2016-08-21 10:30:21 +00:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
2017-03-27 21:31:18 +00:00
|
|
|
#include "atom/renderer/renderer_client_base.h"
|
2016-08-19 11:47:32 +00:00
|
|
|
|
|
|
|
namespace atom {
|
|
|
|
|
2017-03-27 21:31:18 +00:00
|
|
|
class AtomSandboxedRendererClient : public RendererClientBase {
|
2016-08-19 11:47:32 +00:00
|
|
|
public:
|
|
|
|
AtomSandboxedRendererClient();
|
|
|
|
virtual ~AtomSandboxedRendererClient();
|
|
|
|
|
2017-02-20 13:59:39 +00:00
|
|
|
void InvokeIpcCallback(v8::Handle<v8::Context> context,
|
2017-03-29 19:29:52 +00:00
|
|
|
const std::string& callback_name,
|
2017-02-20 13:59:39 +00:00
|
|
|
std::vector<v8::Handle<v8::Value>> args);
|
2017-04-08 13:58:13 +00:00
|
|
|
// atom::RendererClientBase:
|
|
|
|
void DidCreateScriptContext(
|
|
|
|
v8::Handle<v8::Context> context,
|
|
|
|
content::RenderFrame* render_frame) override;
|
|
|
|
void WillReleaseScriptContext(
|
|
|
|
v8::Handle<v8::Context> context,
|
|
|
|
content::RenderFrame* render_frame) override;
|
2017-04-08 14:12:18 +00:00
|
|
|
void SetupMainWorldOverrides(v8::Handle<v8::Context> context) override { }
|
|
|
|
bool isolated_world() override { return false; }
|
2016-08-21 10:30:21 +00:00
|
|
|
// content::ContentRendererClient:
|
|
|
|
void RenderFrameCreated(content::RenderFrame*) override;
|
|
|
|
void RenderViewCreated(content::RenderView*) override;
|
|
|
|
|
2016-08-19 11:47:32 +00:00
|
|
|
private:
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(AtomSandboxedRendererClient);
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace atom
|
|
|
|
|
|
|
|
#endif // ATOM_RENDERER_ATOM_SANDBOXED_RENDERER_CLIENT_H_
|