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