| 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_view_host.h" | 5 #include "content/browser/renderer_host/render_view_host.h" | 
| 6 | 6 | 
| 7 #include <set> | 7 #include <set> | 
| 8 #include <string> | 8 #include <string> | 
| 9 #include <utility> | 9 #include <utility> | 
| 10 #include <vector> | 10 #include <vector> | 
| (...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1101   delegate_->RequestOpenURL( | 1101   delegate_->RequestOpenURL( | 
| 1102       validated_url, referrer, disposition, source_frame_id); | 1102       validated_url, referrer, disposition, source_frame_id); | 
| 1103 } | 1103 } | 
| 1104 | 1104 | 
| 1105 void RenderViewHost::OnMsgDidContentsPreferredSizeChange( | 1105 void RenderViewHost::OnMsgDidContentsPreferredSizeChange( | 
| 1106     const gfx::Size& new_size) { | 1106     const gfx::Size& new_size) { | 
| 1107   delegate_->UpdatePreferredSize(new_size); | 1107   delegate_->UpdatePreferredSize(new_size); | 
| 1108 } | 1108 } | 
| 1109 | 1109 | 
| 1110 void RenderViewHost::OnRenderAutoResized(const gfx::Size& new_size) { | 1110 void RenderViewHost::OnRenderAutoResized(const gfx::Size& new_size) { | 
| 1111   delegate_->UpdatePreferredSize(new_size); | 1111   delegate_->ResizeDueToAutoResize(new_size); | 
| 1112 } | 1112 } | 
| 1113 | 1113 | 
| 1114 void RenderViewHost::OnMsgDidChangeScrollbarsForMainFrame( | 1114 void RenderViewHost::OnMsgDidChangeScrollbarsForMainFrame( | 
| 1115     bool has_horizontal_scrollbar, bool has_vertical_scrollbar) { | 1115     bool has_horizontal_scrollbar, bool has_vertical_scrollbar) { | 
| 1116   if (view_) | 1116   if (view_) | 
| 1117     view_->SetHasHorizontalScrollbar(has_horizontal_scrollbar); | 1117     view_->SetHasHorizontalScrollbar(has_horizontal_scrollbar); | 
| 1118 } | 1118 } | 
| 1119 | 1119 | 
| 1120 void RenderViewHost::OnMsgDidChangeScrollOffsetPinningForMainFrame( | 1120 void RenderViewHost::OnMsgDidChangeScrollOffsetPinningForMainFrame( | 
| 1121     bool is_pinned_to_left, bool is_pinned_to_right) { | 1121     bool is_pinned_to_left, bool is_pinned_to_right) { | 
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1425 void RenderViewHost::EnablePreferredSizeMode() { | 1425 void RenderViewHost::EnablePreferredSizeMode() { | 
| 1426   Send(new ViewMsg_EnablePreferredSizeChangedMode(routing_id())); | 1426   Send(new ViewMsg_EnablePreferredSizeChangedMode(routing_id())); | 
| 1427 } | 1427 } | 
| 1428 | 1428 | 
| 1429 void RenderViewHost::EnableAutoResize(const gfx::Size& min_size, | 1429 void RenderViewHost::EnableAutoResize(const gfx::Size& min_size, | 
| 1430                                       const gfx::Size& max_size) { | 1430                                       const gfx::Size& max_size) { | 
| 1431   SetShouldAutoResize(true); | 1431   SetShouldAutoResize(true); | 
| 1432   Send(new ViewMsg_EnableAutoResize(routing_id(), min_size, max_size)); | 1432   Send(new ViewMsg_EnableAutoResize(routing_id(), min_size, max_size)); | 
| 1433 } | 1433 } | 
| 1434 | 1434 | 
|  | 1435 void RenderViewHost::DisableAutoResize(const gfx::Size& new_size) { | 
|  | 1436   SetShouldAutoResize(false); | 
|  | 1437   Send(new ViewMsg_DisableAutoResize(routing_id(), new_size)); | 
|  | 1438 } | 
|  | 1439 | 
| 1435 void RenderViewHost::ExecuteCustomContextMenuCommand( | 1440 void RenderViewHost::ExecuteCustomContextMenuCommand( | 
| 1436     int action, const content::CustomContextMenuContext& context) { | 1441     int action, const content::CustomContextMenuContext& context) { | 
| 1437   Send(new ViewMsg_CustomContextMenuAction(routing_id(), context, action)); | 1442   Send(new ViewMsg_CustomContextMenuAction(routing_id(), context, action)); | 
| 1438 } | 1443 } | 
| 1439 | 1444 | 
| 1440 void RenderViewHost::NotifyContextMenuClosed( | 1445 void RenderViewHost::NotifyContextMenuClosed( | 
| 1441     const content::CustomContextMenuContext& context) { | 1446     const content::CustomContextMenuContext& context) { | 
| 1442   Send(new ViewMsg_ContextMenuClosed(routing_id(), context)); | 1447   Send(new ViewMsg_ContextMenuClosed(routing_id(), context)); | 
| 1443 } | 1448 } | 
| 1444 | 1449 | 
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1618   // Whenever we change swap out state, we should not be waiting for | 1623   // Whenever we change swap out state, we should not be waiting for | 
| 1619   // beforeunload or unload acks.  We clear them here to be safe, since they | 1624   // beforeunload or unload acks.  We clear them here to be safe, since they | 
| 1620   // can cause navigations to be ignored in OnMsgNavigate. | 1625   // can cause navigations to be ignored in OnMsgNavigate. | 
| 1621   is_waiting_for_beforeunload_ack_ = false; | 1626   is_waiting_for_beforeunload_ack_ = false; | 
| 1622   is_waiting_for_unload_ack_ = false; | 1627   is_waiting_for_unload_ack_ = false; | 
| 1623 } | 1628 } | 
| 1624 | 1629 | 
| 1625 void RenderViewHost::ClearPowerSaveBlockers() { | 1630 void RenderViewHost::ClearPowerSaveBlockers() { | 
| 1626   STLDeleteValues(&power_save_blockers_); | 1631   STLDeleteValues(&power_save_blockers_); | 
| 1627 } | 1632 } | 
| OLD | NEW | 
|---|