Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 954793002: Make load events in iframe elements work with OOPIF (Chromium side). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 6b248ecd6ea08ebf59e807c44023c5d515d60916..38f4192c62ab9c49290126814c0db5313c88ade3 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -373,6 +373,7 @@ bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) {
IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding)
IPC_MESSAGE_HANDLER(FrameHostMsg_BeginNavigation,
OnBeginNavigation)
+ IPC_MESSAGE_HANDLER(FrameHostMsg_DispatchLoad, OnDispatchLoad)
IPC_MESSAGE_HANDLER(FrameHostMsg_TextSurroundingSelectionResponse,
OnTextSurroundingSelectionResponse)
IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Events, OnAccessibilityEvents)
@@ -1223,6 +1224,21 @@ void RenderFrameHostImpl::OnBeginNavigation(
frame_tree_node(), common_params, begin_params, body);
}
+void RenderFrameHostImpl::OnDispatchLoad() {
+ CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kSitePerProcess));
+ // Only frames with an out-of-process parent frame should be sending this
+ // message.
+ RenderFrameProxyHost* proxy =
+ frame_tree_node()->render_manager()->GetProxyToParent();
+ if (!proxy) {
+ GetProcess()->ReceivedBadMessage();
+ return;
+ }
+
+ proxy->Send(new FrameMsg_DispatchLoad(proxy->GetRoutingID()));
+}
+
void RenderFrameHostImpl::OnAccessibilityEvents(
const std::vector<AccessibilityHostMsg_EventParams>& params,
int reset_token) {
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/browser/site_per_process_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698