diff --git a/atom/renderer/atom_render_view_observer.cc b/atom/renderer/atom_render_view_observer.cc index 5720be1bf92a..94c655b14833 100644 --- a/atom/renderer/atom_render_view_observer.cc +++ b/atom/renderer/atom_render_view_observer.cc @@ -84,10 +84,10 @@ AtomRenderViewObserver::AtomRenderViewObserver( AtomRenderViewObserver::~AtomRenderViewObserver() { } -void AtomRenderViewObserver::EmitIPCEvent(blink::WebFrame* frame, +void AtomRenderViewObserver::EmitIPCEvent(blink::WebLocalFrame* frame, const base::string16& channel, const base::ListValue& args) { - if (!frame || frame->IsWebRemoteFrame()) + if (!frame) return; v8::Isolate* isolate = blink::MainThreadIsolate(); @@ -163,13 +163,15 @@ void AtomRenderViewObserver::OnBrowserMessage(bool send_to_all, return; } - EmitIPCEvent(frame, channel, args); + EmitIPCEvent(frame->ToWebLocalFrame(), channel, args); // Also send the message to all sub-frames. if (send_to_all) { for (blink::WebFrame* child = frame->FirstChild(); child; child = child->NextSibling()) - EmitIPCEvent(child, channel, args); + if (child->IsWebLocalFrame()) { + EmitIPCEvent(child->ToWebLocalFrame(), channel, args); + } } } diff --git a/atom/renderer/atom_render_view_observer.h b/atom/renderer/atom_render_view_observer.h index 7c15cb8960bf..e9fdae0e99b5 100644 --- a/atom/renderer/atom_render_view_observer.h +++ b/atom/renderer/atom_render_view_observer.h @@ -8,6 +8,7 @@ #include "base/strings/string16.h" #include "content/public/renderer/render_view_observer.h" #include "third_party/WebKit/public/web/WebFrame.h" +#include "third_party/WebKit/public/web/WebLocalFrame.h" namespace base { class ListValue; @@ -25,7 +26,7 @@ class AtomRenderViewObserver : public content::RenderViewObserver { protected: virtual ~AtomRenderViewObserver(); - virtual void EmitIPCEvent(blink::WebFrame* frame, + virtual void EmitIPCEvent(blink::WebLocalFrame* frame, const base::string16& channel, const base::ListValue& args); diff --git a/atom/renderer/atom_sandboxed_renderer_client.cc b/atom/renderer/atom_sandboxed_renderer_client.cc index 069ff42e7bf6..d82fe677d4b9 100644 --- a/atom/renderer/atom_sandboxed_renderer_client.cc +++ b/atom/renderer/atom_sandboxed_renderer_client.cc @@ -107,10 +107,10 @@ class AtomSandboxedRenderViewObserver : public AtomRenderViewObserver { } protected: - void EmitIPCEvent(blink::WebFrame* frame, + void EmitIPCEvent(blink::WebLocalFrame* frame, const base::string16& channel, const base::ListValue& args) override { - if (!frame || frame->IsWebRemoteFrame()) + if (!frame) return; auto isolate = blink::MainThreadIsolate(); diff --git a/atom/renderer/renderer_client_base.cc b/atom/renderer/renderer_client_base.cc index 3e6e48e66c7c..f28099931f30 100644 --- a/atom/renderer/renderer_client_base.cc +++ b/atom/renderer/renderer_client_base.cc @@ -217,7 +217,7 @@ void RendererClientBase::AddSupportedKeySystems( } v8::Local RendererClientBase::GetContext( - blink::WebFrame* frame, v8::Isolate* isolate) { + blink::WebLocalFrame* frame, v8::Isolate* isolate) { if (isolated_world()) return frame->WorldScriptContext(isolate, World::ISOLATED_WORLD); else diff --git a/atom/renderer/renderer_client_base.h b/atom/renderer/renderer_client_base.h index 495e27369978..ba302e6a3449 100644 --- a/atom/renderer/renderer_client_base.h +++ b/atom/renderer/renderer_client_base.h @@ -9,6 +9,7 @@ #include #include "content/public/renderer/content_renderer_client.h" +#include "third_party/WebKit/public/web/WebLocalFrame.h" namespace atom { @@ -30,7 +31,7 @@ class RendererClientBase : public content::ContentRendererClient { // Get the context that the Electron API is running in. v8::Local GetContext( - blink::WebFrame* frame, v8::Isolate* isolate); + blink::WebLocalFrame* frame, v8::Isolate* isolate); protected: void AddRenderBindings(v8::Isolate* isolate,