OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/renderer_host/render_widget_host.h" | 5 #include "chrome/browser/renderer_host/render_widget_host.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
786 } | 786 } |
787 | 787 |
788 void RenderWidgetHost::OnMsgClose() { | 788 void RenderWidgetHost::OnMsgClose() { |
789 Shutdown(); | 789 Shutdown(); |
790 } | 790 } |
791 | 791 |
792 void RenderWidgetHost::OnMsgRequestMove(const gfx::Rect& pos) { | 792 void RenderWidgetHost::OnMsgRequestMove(const gfx::Rect& pos) { |
793 // Note that we ignore the position. | 793 // Note that we ignore the position. |
794 if (view_) { | 794 if (view_) { |
795 view_->SetSize(pos.size()); | 795 view_->SetSize(pos.size()); |
| 796 view_->MoveTo(pos.origin()); |
796 Send(new ViewMsg_Move_ACK(routing_id_)); | 797 Send(new ViewMsg_Move_ACK(routing_id_)); |
797 } | 798 } |
798 } | 799 } |
799 | 800 |
800 void RenderWidgetHost::OnMsgPaintAtSizeAck(int tag, const gfx::Size& size) { | 801 void RenderWidgetHost::OnMsgPaintAtSizeAck(int tag, const gfx::Size& size) { |
801 PaintAtSizeAckDetails details = {tag, size}; | 802 PaintAtSizeAckDetails details = {tag, size}; |
802 gfx::Size size_details = size; | 803 gfx::Size size_details = size; |
803 NotificationService::current()->Notify( | 804 NotificationService::current()->Notify( |
804 NotificationType::RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK, | 805 NotificationType::RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK, |
805 Source<RenderWidgetHost>(this), | 806 Source<RenderWidgetHost>(this), |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1263 return; | 1264 return; |
1264 | 1265 |
1265 for (int i = 0; i < static_cast<int>(deferred_plugin_handles_.size()); i++) { | 1266 for (int i = 0; i < static_cast<int>(deferred_plugin_handles_.size()); i++) { |
1266 #if defined(TOOLKIT_USES_GTK) | 1267 #if defined(TOOLKIT_USES_GTK) |
1267 view_->CreatePluginContainer(deferred_plugin_handles_[i]); | 1268 view_->CreatePluginContainer(deferred_plugin_handles_[i]); |
1268 #endif | 1269 #endif |
1269 } | 1270 } |
1270 | 1271 |
1271 deferred_plugin_handles_.clear(); | 1272 deferred_plugin_handles_.clear(); |
1272 } | 1273 } |
OLD | NEW |