Chromium Code Reviews| 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 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 791 // Is that really what we want in response to this message? I'm matching | 791 // Is that really what we want in response to this message? I'm matching |
| 792 // previous behavior of the code here. | 792 // previous behavior of the code here. |
| 793 Destroy(); | 793 Destroy(); |
| 794 } | 794 } |
| 795 | 795 |
| 796 void RenderWidgetHost::OnMsgClose() { | 796 void RenderWidgetHost::OnMsgClose() { |
| 797 Shutdown(); | 797 Shutdown(); |
| 798 } | 798 } |
| 799 | 799 |
| 800 void RenderWidgetHost::OnMsgRequestMove(const gfx::Rect& pos) { | 800 void RenderWidgetHost::OnMsgRequestMove(const gfx::Rect& pos) { |
| 801 // Note that we ignore the position. | 801 // Note that we ignore the position. |
|
Peter Kasting
2011/03/07 19:25:44
This comment lies.
Is the change below desirable?
honten.org
2011/03/07 19:36:07
You are right.
We should should remove it.
On 20
Peter Kasting
2011/03/07 20:20:15
I'm just really curious. "Request move" sounds li
honten.org
2011/03/07 21:19:50
I don't know why. AFAIK, |pos| originally doesn't
| |
| 802 if (view_) { | 802 if (view_) { |
| 803 view_->SetSize(pos.size()); | 803 view_->SetBounds(pos); |
| 804 Send(new ViewMsg_Move_ACK(routing_id_)); | 804 Send(new ViewMsg_Move_ACK(routing_id_)); |
| 805 } | 805 } |
| 806 } | 806 } |
| 807 | 807 |
| 808 void RenderWidgetHost::OnMsgPaintAtSizeAck(int tag, const gfx::Size& size) { | 808 void RenderWidgetHost::OnMsgPaintAtSizeAck(int tag, const gfx::Size& size) { |
| 809 PaintAtSizeAckDetails details = {tag, size}; | 809 PaintAtSizeAckDetails details = {tag, size}; |
| 810 gfx::Size size_details = size; | 810 gfx::Size size_details = size; |
| 811 NotificationService::current()->Notify( | 811 NotificationService::current()->Notify( |
| 812 NotificationType::RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK, | 812 NotificationType::RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK, |
| 813 Source<RenderWidgetHost>(this), | 813 Source<RenderWidgetHost>(this), |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1278 return; | 1278 return; |
| 1279 | 1279 |
| 1280 for (int i = 0; i < static_cast<int>(deferred_plugin_handles_.size()); i++) { | 1280 for (int i = 0; i < static_cast<int>(deferred_plugin_handles_.size()); i++) { |
| 1281 #if defined(TOOLKIT_USES_GTK) | 1281 #if defined(TOOLKIT_USES_GTK) |
| 1282 view_->CreatePluginContainer(deferred_plugin_handles_[i]); | 1282 view_->CreatePluginContainer(deferred_plugin_handles_[i]); |
| 1283 #endif | 1283 #endif |
| 1284 } | 1284 } |
| 1285 | 1285 |
| 1286 deferred_plugin_handles_.clear(); | 1286 deferred_plugin_handles_.clear(); |
| 1287 } | 1287 } |
| OLD | NEW |