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>
|
|
|
|
|
2016-08-19 11:47:32 +00:00
|
|
|
#include "content/public/renderer/content_renderer_client.h"
|
2016-08-21 10:30:21 +00:00
|
|
|
#include "content/public/renderer/render_frame.h"
|
2016-08-19 11:47:32 +00:00
|
|
|
|
|
|
|
namespace atom {
|
|
|
|
|
|
|
|
class AtomSandboxedRendererClient : public content::ContentRendererClient {
|
|
|
|
public:
|
|
|
|
AtomSandboxedRendererClient();
|
|
|
|
virtual ~AtomSandboxedRendererClient();
|
|
|
|
|
2016-08-21 10:30:21 +00:00
|
|
|
void DidCreateScriptContext(
|
|
|
|
v8::Handle<v8::Context> context, content::RenderFrame* render_frame);
|
|
|
|
void WillReleaseScriptContext(
|
|
|
|
v8::Handle<v8::Context> context, content::RenderFrame* render_frame);
|
2017-02-20 13:59:39 +00:00
|
|
|
void InvokeIpcCallback(v8::Handle<v8::Context> context,
|
|
|
|
std::string callback_name,
|
|
|
|
std::vector<v8::Handle<v8::Value>> args);
|
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_
|