Index: components/guest_view/browser/guest_view_base.cc |
diff --git a/components/guest_view/browser/guest_view_base.cc b/components/guest_view/browser/guest_view_base.cc |
index e2ffccee70d4728e19726a3b7aea8f4c93c49aaa..63c9e05c425e63a657a5d78ba27b05a411bf62de 100644 |
--- a/components/guest_view/browser/guest_view_base.cc |
+++ b/components/guest_view/browser/guest_view_base.cc |
@@ -20,6 +20,7 @@ |
#include "content/public/browser/render_frame_host.h" |
#include "content/public/browser/render_process_host.h" |
#include "content/public/browser/render_view_host.h" |
+#include "content/public/browser/render_widget_host.h" |
#include "content/public/browser/render_widget_host_view.h" |
#include "content/public/browser/web_contents.h" |
#include "content/public/common/page_zoom.h" |
@@ -416,9 +417,9 @@ void GuestViewBase::DidAttach(int guest_proxy_routing_id) { |
DidAttachToEmbedder(); |
// Inform the associated GuestViewContainer that the contentWindow is ready. |
- embedder_web_contents()->Send(new GuestViewMsg_GuestAttached( |
- element_instance_id_, |
- guest_proxy_routing_id)); |
+ GetEmbedderFrame()->GetView()->GetRenderWidgetHost()->Send( |
+ new GuestViewMsg_GuestAttached(element_instance_id_, |
+ guest_proxy_routing_id)); |
SendQueuedEvents(); |
} |
@@ -726,6 +727,12 @@ void GuestViewBase::FindReply(WebContents* source, |
} |
} |
+content::RenderFrameHost* GuestViewBase::GetEmbedderFrame() { |
+ if (GetOwnerWebContents()) |
+ return GetOwnerWebContents()->GetMainFrame(); |
+ return nullptr; |
+} |
+ |
void GuestViewBase::OnZoomChanged( |
const zoom::ZoomController::ZoomChangedEventData& data) { |
if (data.web_contents == embedder_web_contents()) { |