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 1399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1410 | 1410 |
1411 if (view_->GetViewBounds() == last_view_screen_rect_ && | 1411 if (view_->GetViewBounds() == last_view_screen_rect_ && |
1412 view_->GetBoundsInRootWindow() == last_window_screen_rect_) { | 1412 view_->GetBoundsInRootWindow() == last_window_screen_rect_) { |
1413 return; | 1413 return; |
1414 } | 1414 } |
1415 | 1415 |
1416 SendScreenRects(); | 1416 SendScreenRects(); |
1417 } | 1417 } |
1418 | 1418 |
1419 void RenderWidgetHostImpl::OnRequestMove(const gfx::Rect& pos) { | 1419 void RenderWidgetHostImpl::OnRequestMove(const gfx::Rect& pos) { |
1420 // Note that we ignore the position. | |
1421 if (view_) { | 1420 if (view_) { |
1422 view_->SetBounds(pos); | 1421 view_->SetBounds(pos); |
1423 Send(new ViewMsg_Move_ACK(routing_id_)); | 1422 Send(new ViewMsg_Move_ACK(routing_id_)); |
1424 } | 1423 } |
1425 } | 1424 } |
1426 | 1425 |
1427 void RenderWidgetHostImpl::OnPaintAtSizeAck(int tag, const gfx::Size& size) { | 1426 void RenderWidgetHostImpl::OnPaintAtSizeAck(int tag, const gfx::Size& size) { |
1428 std::pair<int, gfx::Size> details = std::make_pair(tag, size); | 1427 std::pair<int, gfx::Size> details = std::make_pair(tag, size); |
1429 NotificationService::current()->Notify( | 1428 NotificationService::current()->Notify( |
1430 NOTIFICATION_RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK, | 1429 NOTIFICATION_RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK, |
(...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2468 int process_id = (b->first.second >> 32) & 0xffffffff; | 2467 int process_id = (b->first.second >> 32) & 0xffffffff; |
2469 RenderWidgetHost* rwh = | 2468 RenderWidgetHost* rwh = |
2470 RenderWidgetHost::FromID(process_id, routing_id); | 2469 RenderWidgetHost::FromID(process_id, routing_id); |
2471 if (!rwh) | 2470 if (!rwh) |
2472 continue; | 2471 continue; |
2473 RenderWidgetHostImpl::From(rwh)->FrameSwapped(latency_info); | 2472 RenderWidgetHostImpl::From(rwh)->FrameSwapped(latency_info); |
2474 } | 2473 } |
2475 } | 2474 } |
2476 | 2475 |
2477 } // namespace content | 2476 } // namespace content |
OLD | NEW |