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 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
995 WindowOpenDisposition disposition) { | 995 WindowOpenDisposition disposition) { |
996 GURL validated_url(url); | 996 GURL validated_url(url); |
997 FilterURL(ChildProcessSecurityPolicy::GetInstance(), | 997 FilterURL(ChildProcessSecurityPolicy::GetInstance(), |
998 process()->id(), &validated_url); | 998 process()->id(), &validated_url); |
999 | 999 |
1000 delegate_->RequestOpenURL(validated_url, referrer, disposition); | 1000 delegate_->RequestOpenURL(validated_url, referrer, disposition); |
1001 } | 1001 } |
1002 | 1002 |
1003 void RenderViewHost::OnMsgDidContentsPreferredSizeChange( | 1003 void RenderViewHost::OnMsgDidContentsPreferredSizeChange( |
1004 const gfx::Size& new_size) { | 1004 const gfx::Size& new_size) { |
1005 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); | 1005 delegate_->UpdatePreferredSize(new_size); |
1006 if (!view) | |
1007 return; | |
1008 view->UpdatePreferredSize(new_size); | |
1009 } | 1006 } |
1010 | 1007 |
1011 void RenderViewHost::OnMsgDidChangeScrollbarsForMainFrame( | 1008 void RenderViewHost::OnMsgDidChangeScrollbarsForMainFrame( |
1012 bool has_horizontal_scrollbar, bool has_vertical_scrollbar) { | 1009 bool has_horizontal_scrollbar, bool has_vertical_scrollbar) { |
1013 if (view()) | 1010 if (view()) |
1014 view()->SetHasHorizontalScrollbar(has_horizontal_scrollbar); | 1011 view()->SetHasHorizontalScrollbar(has_horizontal_scrollbar); |
1015 } | 1012 } |
1016 | 1013 |
1017 void RenderViewHost::OnMsgDidChangeScrollOffsetPinningForMainFrame( | 1014 void RenderViewHost::OnMsgDidChangeScrollOffsetPinningForMainFrame( |
1018 bool is_pinned_to_left, bool is_pinned_to_right) { | 1015 bool is_pinned_to_left, bool is_pinned_to_right) { |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1362 params.right_aligned); | 1359 params.right_aligned); |
1363 } | 1360 } |
1364 } | 1361 } |
1365 #endif | 1362 #endif |
1366 | 1363 |
1367 void RenderViewHost::OnRunFileChooser( | 1364 void RenderViewHost::OnRunFileChooser( |
1368 const ViewHostMsg_RunFileChooser_Params& params) { | 1365 const ViewHostMsg_RunFileChooser_Params& params) { |
1369 delegate_->RunFileChooser(this, params); | 1366 delegate_->RunFileChooser(this, params); |
1370 } | 1367 } |
1371 | 1368 |
OLD | NEW |