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

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: addressing comments 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
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 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after
1518 const gfx::Rect& window_screen_rect) { 1518 const gfx::Rect& window_screen_rect) {
1519 if (screen_metrics_emulator_) { 1519 if (screen_metrics_emulator_) {
1520 screen_metrics_emulator_->OnUpdateScreenRects(view_screen_rect, 1520 screen_metrics_emulator_->OnUpdateScreenRects(view_screen_rect,
1521 window_screen_rect); 1521 window_screen_rect);
1522 } else { 1522 } else {
1523 SetScreenRects(view_screen_rect, window_screen_rect); 1523 SetScreenRects(view_screen_rect, window_screen_rect);
1524 } 1524 }
1525 Send(new ViewHostMsg_UpdateScreenRects_ACK(routing_id())); 1525 Send(new ViewHostMsg_UpdateScreenRects_ACK(routing_id()));
1526 } 1526 }
1527 1527
1528 void RenderWidget::OnUpdateWindowScreenRect(
1529 const gfx::Rect& window_screen_rect) {
1530 if (screen_metrics_emulator_) {
1531 screen_metrics_emulator_->OnUpdateWindowScreenRectMessage(
1532 window_screen_rect);
1533 } else {
1534 window_screen_rect_ = window_screen_rect;
1535 }
1536 }
1537
1528 void RenderWidget::OnSetSurfaceIdNamespace(uint32_t surface_id_namespace) { 1538 void RenderWidget::OnSetSurfaceIdNamespace(uint32_t surface_id_namespace) {
1529 if (compositor_) 1539 if (compositor_)
1530 compositor_->SetSurfaceIdNamespace(surface_id_namespace); 1540 compositor_->SetSurfaceIdNamespace(surface_id_namespace);
1531 } 1541 }
1532 1542
1533 void RenderWidget::OnHandleCompositorProto(const std::vector<uint8_t>& proto) { 1543 void RenderWidget::OnHandleCompositorProto(const std::vector<uint8_t>& proto) {
1534 if (compositor_) 1544 if (compositor_)
1535 compositor_->OnHandleCompositorProto(proto); 1545 compositor_->OnHandleCompositorProto(proto);
1536 } 1546 }
1537 1547
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
2113 video_hole_frames_.RemoveObserver(frame); 2123 video_hole_frames_.RemoveObserver(frame);
2114 } 2124 }
2115 #endif // defined(VIDEO_HOLE) 2125 #endif // defined(VIDEO_HOLE)
2116 2126
2117 void RenderWidget::OnWaitNextFrameForTests(int routing_id) { 2127 void RenderWidget::OnWaitNextFrameForTests(int routing_id) {
2118 QueueMessage(new ViewHostMsg_WaitForNextFrameForTests_ACK(routing_id), 2128 QueueMessage(new ViewHostMsg_WaitForNextFrameForTests_ACK(routing_id),
2119 MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE); 2129 MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE);
2120 } 2130 }
2121 2131
2122 } // namespace content 2132 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698