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

Side by Side Diff: content/renderer/render_widget.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: properly rebasing Created 4 years, 9 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
« no previous file with comments | « content/renderer/render_widget.h ('k') | ipc/ipc_message_macros.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after
1524 const gfx::Rect& window_screen_rect) { 1524 const gfx::Rect& window_screen_rect) {
1525 if (screen_metrics_emulator_) { 1525 if (screen_metrics_emulator_) {
1526 screen_metrics_emulator_->OnUpdateScreenRects(view_screen_rect, 1526 screen_metrics_emulator_->OnUpdateScreenRects(view_screen_rect,
1527 window_screen_rect); 1527 window_screen_rect);
1528 } else { 1528 } else {
1529 SetScreenRects(view_screen_rect, window_screen_rect); 1529 SetScreenRects(view_screen_rect, window_screen_rect);
1530 } 1530 }
1531 Send(new ViewHostMsg_UpdateScreenRects_ACK(routing_id())); 1531 Send(new ViewHostMsg_UpdateScreenRects_ACK(routing_id()));
1532 } 1532 }
1533 1533
1534 void RenderWidget::OnUpdateWindowScreenRect(
1535 const gfx::Rect& window_screen_rect) {
1536 if (screen_metrics_emulator_) {
1537 screen_metrics_emulator_->OnUpdateWindowScreenRect(window_screen_rect);
1538 } else {
1539 window_screen_rect_ = window_screen_rect;
1540 }
1541 }
1542
1534 void RenderWidget::OnSetSurfaceIdNamespace(uint32_t surface_id_namespace) { 1543 void RenderWidget::OnSetSurfaceIdNamespace(uint32_t surface_id_namespace) {
1535 if (compositor_) 1544 if (compositor_)
1536 compositor_->SetSurfaceIdNamespace(surface_id_namespace); 1545 compositor_->SetSurfaceIdNamespace(surface_id_namespace);
1537 } 1546 }
1538 1547
1539 void RenderWidget::OnHandleCompositorProto(const std::vector<uint8_t>& proto) { 1548 void RenderWidget::OnHandleCompositorProto(const std::vector<uint8_t>& proto) {
1540 if (compositor_) 1549 if (compositor_)
1541 compositor_->OnHandleCompositorProto(proto); 1550 compositor_->OnHandleCompositorProto(proto);
1542 } 1551 }
1543 1552
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
2135 } 2144 }
2136 2145
2137 float RenderWidget::GetOriginalDeviceScaleFactor() const { 2146 float RenderWidget::GetOriginalDeviceScaleFactor() const {
2138 return 2147 return
2139 screen_metrics_emulator_ ? 2148 screen_metrics_emulator_ ?
2140 screen_metrics_emulator_->original_screen_info().deviceScaleFactor : 2149 screen_metrics_emulator_->original_screen_info().deviceScaleFactor :
2141 device_scale_factor_; 2150 device_scale_factor_;
2142 } 2151 }
2143 2152
2144 } // namespace content 2153 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_widget.h ('k') | ipc/ipc_message_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698