Make AtomSandboxedRendererClient a RendererClientBase subclass.

This commit is contained in:
Thiago de Arruda 2017-03-27 18:31:18 -03:00
parent c3a8f665f2
commit d1f08beddf
2 changed files with 5 additions and 4 deletions

View file

@ -182,12 +182,13 @@ AtomSandboxedRendererClient::~AtomSandboxedRendererClient() {
void AtomSandboxedRendererClient::RenderFrameCreated(
content::RenderFrame* render_frame) {
new AtomSandboxedRenderFrameObserver(render_frame, this);
new printing::PrintWebViewHelper(render_frame);
RendererClientBase::RenderFrameCreated(render_frame);
}
void AtomSandboxedRendererClient::RenderViewCreated(
content::RenderView* render_view) {
new AtomSandboxedRenderViewObserver(render_view, this);
RendererClientBase::RenderViewCreated(render_view);
}
void AtomSandboxedRendererClient::DidCreateScriptContext(
@ -218,6 +219,7 @@ void AtomSandboxedRendererClient::DidCreateScriptContext(
// Create and initialize the binding object
auto binding = v8::Object::New(isolate);
InitializeBindings(binding, context);
AddRenderBindings(isolate, binding);
v8::Local<v8::Value> args[] = {
binding,
mate::ConvertToV8(isolate, preload_script)

View file

@ -7,12 +7,11 @@
#include <string>
#include <vector>
#include "content/public/renderer/content_renderer_client.h"
#include "content/public/renderer/render_frame.h"
#include "atom/renderer/renderer_client_base.h"
namespace atom {
class AtomSandboxedRendererClient : public content::ContentRendererClient {
class AtomSandboxedRendererClient : public RendererClientBase {
public:
AtomSandboxedRendererClient();
virtual ~AtomSandboxedRendererClient();