Make AtomSandboxedRendererClient a RendererClientBase subclass.
This commit is contained in:
parent
c3a8f665f2
commit
d1f08beddf
2 changed files with 5 additions and 4 deletions
|
@ -182,12 +182,13 @@ AtomSandboxedRendererClient::~AtomSandboxedRendererClient() {
|
||||||
void AtomSandboxedRendererClient::RenderFrameCreated(
|
void AtomSandboxedRendererClient::RenderFrameCreated(
|
||||||
content::RenderFrame* render_frame) {
|
content::RenderFrame* render_frame) {
|
||||||
new AtomSandboxedRenderFrameObserver(render_frame, this);
|
new AtomSandboxedRenderFrameObserver(render_frame, this);
|
||||||
new printing::PrintWebViewHelper(render_frame);
|
RendererClientBase::RenderFrameCreated(render_frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AtomSandboxedRendererClient::RenderViewCreated(
|
void AtomSandboxedRendererClient::RenderViewCreated(
|
||||||
content::RenderView* render_view) {
|
content::RenderView* render_view) {
|
||||||
new AtomSandboxedRenderViewObserver(render_view, this);
|
new AtomSandboxedRenderViewObserver(render_view, this);
|
||||||
|
RendererClientBase::RenderViewCreated(render_view);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AtomSandboxedRendererClient::DidCreateScriptContext(
|
void AtomSandboxedRendererClient::DidCreateScriptContext(
|
||||||
|
@ -218,6 +219,7 @@ void AtomSandboxedRendererClient::DidCreateScriptContext(
|
||||||
// Create and initialize the binding object
|
// Create and initialize the binding object
|
||||||
auto binding = v8::Object::New(isolate);
|
auto binding = v8::Object::New(isolate);
|
||||||
InitializeBindings(binding, context);
|
InitializeBindings(binding, context);
|
||||||
|
AddRenderBindings(isolate, binding);
|
||||||
v8::Local<v8::Value> args[] = {
|
v8::Local<v8::Value> args[] = {
|
||||||
binding,
|
binding,
|
||||||
mate::ConvertToV8(isolate, preload_script)
|
mate::ConvertToV8(isolate, preload_script)
|
||||||
|
|
|
@ -7,12 +7,11 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "content/public/renderer/content_renderer_client.h"
|
#include "atom/renderer/renderer_client_base.h"
|
||||||
#include "content/public/renderer/render_frame.h"
|
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
||||||
class AtomSandboxedRendererClient : public content::ContentRendererClient {
|
class AtomSandboxedRendererClient : public RendererClientBase {
|
||||||
public:
|
public:
|
||||||
AtomSandboxedRendererClient();
|
AtomSandboxedRendererClient();
|
||||||
virtual ~AtomSandboxedRendererClient();
|
virtual ~AtomSandboxedRendererClient();
|
||||||
|
|
Loading…
Reference in a new issue