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/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1097 return new_contents; | 1097 return new_contents; |
1098 } | 1098 } |
1099 | 1099 |
1100 bool WebContentsImpl::NavigateToPendingEntry( | 1100 bool WebContentsImpl::NavigateToPendingEntry( |
1101 NavigationController::ReloadType reload_type) { | 1101 NavigationController::ReloadType reload_type) { |
1102 return NavigateToEntry( | 1102 return NavigateToEntry( |
1103 *NavigationEntryImpl::FromNavigationEntry(controller_.GetPendingEntry()), | 1103 *NavigationEntryImpl::FromNavigationEntry(controller_.GetPendingEntry()), |
1104 reload_type); | 1104 reload_type); |
1105 } | 1105 } |
1106 | 1106 |
| 1107 void WebContentsImpl::RenderViewForInterstitialPageCreated( |
| 1108 content::RenderViewHost* render_view_host) { |
| 1109 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 1110 RenderViewForInterstitialPageCreated(render_view_host)); |
| 1111 } |
| 1112 |
1107 bool WebContentsImpl::NavigateToEntry( | 1113 bool WebContentsImpl::NavigateToEntry( |
1108 const NavigationEntryImpl& entry, | 1114 const NavigationEntryImpl& entry, |
1109 NavigationController::ReloadType reload_type) { | 1115 NavigationController::ReloadType reload_type) { |
1110 // The renderer will reject IPC messages with URLs longer than | 1116 // The renderer will reject IPC messages with URLs longer than |
1111 // this limit, so don't attempt to navigate with a longer URL. | 1117 // this limit, so don't attempt to navigate with a longer URL. |
1112 if (entry.GetURL().spec().size() > content::kMaxURLChars) | 1118 if (entry.GetURL().spec().size() > content::kMaxURLChars) |
1113 return false; | 1119 return false; |
1114 | 1120 |
1115 RenderViewHostImpl* dest_render_view_host = | 1121 RenderViewHostImpl* dest_render_view_host = |
1116 static_cast<RenderViewHostImpl*>(render_manager_.Navigate(entry)); | 1122 static_cast<RenderViewHostImpl*>(render_manager_.Navigate(entry)); |
(...skipping 1676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2793 void WebContentsImpl::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 2799 void WebContentsImpl::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
2794 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); | 2800 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); |
2795 // Can be NULL during tests. | 2801 // Can be NULL during tests. |
2796 if (rwh_view) | 2802 if (rwh_view) |
2797 rwh_view->SetSize(GetView()->GetContainerSize()); | 2803 rwh_view->SetSize(GetView()->GetContainerSize()); |
2798 } | 2804 } |
2799 | 2805 |
2800 RenderViewHostImpl* WebContentsImpl::GetRenderViewHostImpl() { | 2806 RenderViewHostImpl* WebContentsImpl::GetRenderViewHostImpl() { |
2801 return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); | 2807 return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); |
2802 } | 2808 } |
OLD | NEW |