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

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

Issue 2122023002: Cross-process frames should be notified of device scale factor changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Version of patch without second test. Created 4 years, 4 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_view_child_frame.cc
diff --git a/content/browser/web_contents/web_contents_view_child_frame.cc b/content/browser/web_contents/web_contents_view_child_frame.cc
index a92a0846c73273d667d62b5baddb91233a3e1670..62f85703286d5bdf641f10825e42d4b14995896c 100644
--- a/content/browser/web_contents/web_contents_view_child_frame.cc
+++ b/content/browser/web_contents/web_contents_view_child_frame.cc
@@ -47,6 +47,18 @@ gfx::NativeWindow WebContentsViewChildFrame::GetTopLevelNativeWindow() const {
return GetOuterView()->GetTopLevelNativeWindow();
}
+void WebContentsViewChildFrame::GetScreenInfo(
+ blink::WebScreenInfo* web_screen_info) const {
+ // TODO(wjmaclean): falling back to the default screen info is not what used
+ // to happen in RenderWidgetHostViewChildFrame, but it seems like the right
+ // thing to do. We should keep an eye on this in case the else-clause below
+ // causes problems.
+ if (web_contents_->GetOuterWebContents())
+ GetOuterView()->GetScreenInfo(web_screen_info);
+ else
+ WebContentsView::GetDefaultScreenInfo(web_screen_info);
+}
+
void WebContentsViewChildFrame::GetContainerBounds(gfx::Rect* out) const {
RenderWidgetHostView* view = web_contents_->GetRenderWidgetHostView();
if (view)
« no previous file with comments | « content/browser/web_contents/web_contents_view_child_frame.h ('k') | content/browser/web_contents/web_contents_view_guest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698