OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1016 | 1016 |
1017 delegate_->RequestOpenURL( | 1017 delegate_->RequestOpenURL( |
1018 validated_url, referrer, disposition, source_frame_id); | 1018 validated_url, referrer, disposition, source_frame_id); |
1019 } | 1019 } |
1020 | 1020 |
1021 void RenderViewHost::OnMsgDidContentsPreferredSizeChange( | 1021 void RenderViewHost::OnMsgDidContentsPreferredSizeChange( |
1022 const gfx::Size& new_size) { | 1022 const gfx::Size& new_size) { |
1023 delegate_->UpdatePreferredSize(new_size); | 1023 delegate_->UpdatePreferredSize(new_size); |
1024 } | 1024 } |
1025 | 1025 |
| 1026 void RenderViewHost::OnRenderAutoResized(const gfx::Size& new_size) { |
| 1027 delegate_->UpdatePreferredSize(new_size); |
| 1028 } |
| 1029 |
1026 void RenderViewHost::OnMsgDidChangeScrollbarsForMainFrame( | 1030 void RenderViewHost::OnMsgDidChangeScrollbarsForMainFrame( |
1027 bool has_horizontal_scrollbar, bool has_vertical_scrollbar) { | 1031 bool has_horizontal_scrollbar, bool has_vertical_scrollbar) { |
1028 if (view()) | 1032 if (view()) |
1029 view()->SetHasHorizontalScrollbar(has_horizontal_scrollbar); | 1033 view()->SetHasHorizontalScrollbar(has_horizontal_scrollbar); |
1030 } | 1034 } |
1031 | 1035 |
1032 void RenderViewHost::OnMsgDidChangeScrollOffsetPinningForMainFrame( | 1036 void RenderViewHost::OnMsgDidChangeScrollOffsetPinningForMainFrame( |
1033 bool is_pinned_to_left, bool is_pinned_to_right) { | 1037 bool is_pinned_to_left, bool is_pinned_to_right) { |
1034 if (view()) | 1038 if (view()) |
1035 view()->SetScrollOffsetPinning(is_pinned_to_left, is_pinned_to_right); | 1039 view()->SetScrollOffsetPinning(is_pinned_to_left, is_pinned_to_right); |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1332 } | 1336 } |
1333 | 1337 |
1334 void RenderViewHost::DisableScrollbarsForThreshold(const gfx::Size& size) { | 1338 void RenderViewHost::DisableScrollbarsForThreshold(const gfx::Size& size) { |
1335 Send(new ViewMsg_DisableScrollbarsForSmallWindows(routing_id(), size)); | 1339 Send(new ViewMsg_DisableScrollbarsForSmallWindows(routing_id(), size)); |
1336 } | 1340 } |
1337 | 1341 |
1338 void RenderViewHost::EnablePreferredSizeMode() { | 1342 void RenderViewHost::EnablePreferredSizeMode() { |
1339 Send(new ViewMsg_EnablePreferredSizeChangedMode(routing_id())); | 1343 Send(new ViewMsg_EnablePreferredSizeChangedMode(routing_id())); |
1340 } | 1344 } |
1341 | 1345 |
| 1346 void RenderViewHost::EnableAutoResize(const gfx::Size& min_size, |
| 1347 const gfx::Size& max_size) { |
| 1348 SetShouldAutoResize(true); |
| 1349 Send(new ViewMsg_EnableAutoResize(routing_id(), min_size, max_size)); |
| 1350 } |
| 1351 |
1342 void RenderViewHost::ExecuteCustomContextMenuCommand( | 1352 void RenderViewHost::ExecuteCustomContextMenuCommand( |
1343 int action, const webkit_glue::CustomContextMenuContext& context) { | 1353 int action, const webkit_glue::CustomContextMenuContext& context) { |
1344 Send(new ViewMsg_CustomContextMenuAction(routing_id(), context, action)); | 1354 Send(new ViewMsg_CustomContextMenuAction(routing_id(), context, action)); |
1345 } | 1355 } |
1346 | 1356 |
1347 void RenderViewHost::NotifyContextMenuClosed( | 1357 void RenderViewHost::NotifyContextMenuClosed( |
1348 const webkit_glue::CustomContextMenuContext& context) { | 1358 const webkit_glue::CustomContextMenuContext& context) { |
1349 Send(new ViewMsg_ContextMenuClosed(routing_id(), context)); | 1359 Send(new ViewMsg_ContextMenuClosed(routing_id(), context)); |
1350 } | 1360 } |
1351 | 1361 |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1503 | 1513 |
1504 void RenderViewHost::OnWebUISend(const GURL& source_url, | 1514 void RenderViewHost::OnWebUISend(const GURL& source_url, |
1505 const std::string& name, | 1515 const std::string& name, |
1506 const base::ListValue& args) { | 1516 const base::ListValue& args) { |
1507 delegate_->WebUISend(this, source_url, name, args); | 1517 delegate_->WebUISend(this, source_url, name, args); |
1508 } | 1518 } |
1509 | 1519 |
1510 void RenderViewHost::ClearPowerSaveBlockers() { | 1520 void RenderViewHost::ClearPowerSaveBlockers() { |
1511 STLDeleteValues(&power_save_blockers_); | 1521 STLDeleteValues(&power_save_blockers_); |
1512 } | 1522 } |
OLD | NEW |