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

Side by Side Diff: content/browser/frame_host/cross_process_frame_connector.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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/cross_process_frame_connector.h" 5 #include "content/browser/frame_host/cross_process_frame_connector.h"
6 6
7 #include "cc/surfaces/surface.h" 7 #include "cc/surfaces/surface.h"
8 #include "cc/surfaces/surface_hittest.h" 8 #include "cc/surfaces/surface_hittest.h"
9 #include "cc/surfaces/surface_manager.h" 9 #include "cc/surfaces/surface_manager.h"
10 #include "content/browser/compositor/surface_utils.h" 10 #include "content/browser/compositor/surface_utils.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 void CrossProcessFrameConnector::OnInitializeChildFrame(float scale_factor) { 117 void CrossProcessFrameConnector::OnInitializeChildFrame(float scale_factor) {
118 if (scale_factor != device_scale_factor_) 118 if (scale_factor != device_scale_factor_)
119 SetDeviceScaleFactor(scale_factor); 119 SetDeviceScaleFactor(scale_factor);
120 } 120 }
121 121
122 gfx::Rect CrossProcessFrameConnector::ChildFrameRect() { 122 gfx::Rect CrossProcessFrameConnector::ChildFrameRect() {
123 return child_frame_rect_; 123 return child_frame_rect_;
124 } 124 }
125 125
126 void CrossProcessFrameConnector::GetScreenInfo(blink::WebScreenInfo* results) {
127 auto* parent_view = GetParentRenderWidgetHostView();
128 if (parent_view) {
129 parent_view->GetScreenInfo(results);
130 }
131 }
132
133 void CrossProcessFrameConnector::UpdateCursor(const WebCursor& cursor) { 126 void CrossProcessFrameConnector::UpdateCursor(const WebCursor& cursor) {
134 RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView(); 127 RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView();
135 if (root_view) 128 if (root_view)
136 root_view->UpdateCursor(cursor); 129 root_view->UpdateCursor(cursor);
137 } 130 }
138 131
139 gfx::Point CrossProcessFrameConnector::TransformPointToRootCoordSpace( 132 gfx::Point CrossProcessFrameConnector::TransformPointToRootCoordSpace(
140 const gfx::Point& point, 133 const gfx::Point& point,
141 const cc::SurfaceId& surface_id) { 134 const cc::SurfaceId& surface_id) {
142 return TransformPointToCoordSpaceForView(point, GetRootRenderWidgetHostView(), 135 return TransformPointToCoordSpaceForView(point, GetRootRenderWidgetHostView(),
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 381
389 if (parent) { 382 if (parent) {
390 return static_cast<RenderWidgetHostViewBase*>( 383 return static_cast<RenderWidgetHostViewBase*>(
391 parent->current_frame_host()->GetView()); 384 parent->current_frame_host()->GetView());
392 } 385 }
393 386
394 return nullptr; 387 return nullptr;
395 } 388 }
396 389
397 } // namespace content 390 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698