OLD | NEW |
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/browser/renderer_host/render_widget_host_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 1405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1416 | 1416 |
1417 if (view_->GetViewBounds() == last_view_screen_rect_ && | 1417 if (view_->GetViewBounds() == last_view_screen_rect_ && |
1418 view_->GetBoundsInRootWindow() == last_window_screen_rect_) { | 1418 view_->GetBoundsInRootWindow() == last_window_screen_rect_) { |
1419 return; | 1419 return; |
1420 } | 1420 } |
1421 | 1421 |
1422 SendScreenRects(); | 1422 SendScreenRects(); |
1423 } | 1423 } |
1424 | 1424 |
1425 void RenderWidgetHostImpl::OnRequestMove(const gfx::Rect& pos) { | 1425 void RenderWidgetHostImpl::OnRequestMove(const gfx::Rect& pos) { |
1426 // Note that we ignore the position. | |
1427 if (view_) { | 1426 if (view_) { |
1428 view_->SetBounds(pos); | 1427 view_->SetBounds(pos); |
1429 Send(new ViewMsg_Move_ACK(routing_id_)); | 1428 Send(new ViewMsg_Move_ACK(routing_id_)); |
1430 } | 1429 } |
1431 } | 1430 } |
1432 | 1431 |
1433 void RenderWidgetHostImpl::OnPaintAtSizeAck(int tag, const gfx::Size& size) { | 1432 void RenderWidgetHostImpl::OnPaintAtSizeAck(int tag, const gfx::Size& size) { |
1434 std::pair<int, gfx::Size> details = std::make_pair(tag, size); | 1433 std::pair<int, gfx::Size> details = std::make_pair(tag, size); |
1435 NotificationService::current()->Notify( | 1434 NotificationService::current()->Notify( |
1436 NOTIFICATION_RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK, | 1435 NOTIFICATION_RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK, |
(...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2476 int process_id = (b->first.second >> 32) & 0xffffffff; | 2475 int process_id = (b->first.second >> 32) & 0xffffffff; |
2477 RenderWidgetHost* rwh = | 2476 RenderWidgetHost* rwh = |
2478 RenderWidgetHost::FromID(process_id, routing_id); | 2477 RenderWidgetHost::FromID(process_id, routing_id); |
2479 if (!rwh) | 2478 if (!rwh) |
2480 continue; | 2479 continue; |
2481 RenderWidgetHostImpl::From(rwh)->FrameSwapped(latency_info); | 2480 RenderWidgetHostImpl::From(rwh)->FrameSwapped(latency_info); |
2482 } | 2481 } |
2483 } | 2482 } |
2484 | 2483 |
2485 } // namespace content | 2484 } // namespace content |
OLD | NEW |