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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1685213002: Propagate window coordinates to out-of-process iframes renderers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sendscreenrects
Patch Set: rebase Created 4 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/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 1578ecf40a0cad0c3cf1b00e394601a62209a678..8dad038a03e681e35753fec1c0d59b77d3a11a84 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -45,6 +45,7 @@
#include "content/browser/frame_host/navigation_handle_impl.h"
#include "content/browser/frame_host/navigator_impl.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
+#include "content/browser/frame_host/render_frame_proxy_host.h"
#include "content/browser/frame_host/render_widget_host_view_child_frame.h"
#include "content/browser/geolocation/geolocation_service_context.h"
#include "content/browser/host_zoom_map_impl.h"
@@ -72,6 +73,7 @@
#include "content/common/browser_plugin/browser_plugin_messages.h"
#include "content/common/frame_messages.h"
#include "content/common/input_messages.h"
+#include "content/common/page_messages.h"
#include "content/common/site_isolation_policy.h"
#include "content/common/ssl_status_serialization.h"
#include "content/common/view_messages.h"
@@ -790,6 +792,10 @@ int WebContentsImpl::SendToAllFrames(IPC::Message* message) {
return number_of_messages;
}
+void WebContentsImpl::SendPageMsg(IPC::Message* msg) {
+ frame_tree_.root()->render_manager()->SendPageMsg(msg);
+}
+
RenderViewHostImpl* WebContentsImpl::GetRenderViewHost() const {
return GetRenderManager()->current_host();
}
@@ -2223,6 +2229,13 @@ void WebContentsImpl::SendScreenRects() {
RenderWidgetHostImpl::From(GetRenderViewHost()->GetWidget())
->SendScreenRects();
+ RenderWidgetHostViewBase* rwhv =
+ static_cast<RenderWidgetHostViewBase*>(GetRenderWidgetHostView());
+ if (rwhv) {
+ SendPageMsg(new PageMsg_UpdateWindowScreenRect(
+ MSG_ROUTING_NONE, rwhv->GetBoundsInRootWindow()));
+ }
+
if (browser_plugin_embedder_)
browser_plugin_embedder_->DidSendScreenRects();
}

Powered by Google App Engine
This is Rietveld 408576698