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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <cmath> | 9 #include <cmath> |
10 #include <utility> | 10 #include <utility> |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 this), | 474 this), |
475 node_(this), | 475 node_(this), |
476 is_load_to_different_document_(false), | 476 is_load_to_different_document_(false), |
477 crashed_status_(base::TERMINATION_STATUS_STILL_RUNNING), | 477 crashed_status_(base::TERMINATION_STATUS_STILL_RUNNING), |
478 crashed_error_code_(0), | 478 crashed_error_code_(0), |
479 waiting_for_response_(false), | 479 waiting_for_response_(false), |
480 load_state_(net::LOAD_STATE_IDLE, base::string16()), | 480 load_state_(net::LOAD_STATE_IDLE, base::string16()), |
481 upload_size_(0), | 481 upload_size_(0), |
482 upload_position_(0), | 482 upload_position_(0), |
483 is_resume_pending_(false), | 483 is_resume_pending_(false), |
| 484 interstitial_page_(nullptr), |
484 has_accessed_initial_document_(false), | 485 has_accessed_initial_document_(false), |
485 theme_color_(SK_ColorTRANSPARENT), | 486 theme_color_(SK_ColorTRANSPARENT), |
486 last_sent_theme_color_(SK_ColorTRANSPARENT), | 487 last_sent_theme_color_(SK_ColorTRANSPARENT), |
487 did_first_visually_non_empty_paint_(false), | 488 did_first_visually_non_empty_paint_(false), |
488 capturer_count_(0), | 489 capturer_count_(0), |
489 should_normally_be_visible_(true), | 490 should_normally_be_visible_(true), |
490 did_first_set_visible_(false), | 491 did_first_set_visible_(false), |
491 is_being_destroyed_(false), | 492 is_being_destroyed_(false), |
492 is_notifying_observers_(false), | 493 is_notifying_observers_(false), |
493 notify_disconnection_(false), | 494 notify_disconnection_(false), |
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1284 SiteInstanceImpl* WebContentsImpl::GetPendingSiteInstance() const { | 1285 SiteInstanceImpl* WebContentsImpl::GetPendingSiteInstance() const { |
1285 RenderViewHostImpl* dest_rvh = | 1286 RenderViewHostImpl* dest_rvh = |
1286 GetRenderManager()->pending_render_view_host() ? | 1287 GetRenderManager()->pending_render_view_host() ? |
1287 GetRenderManager()->pending_render_view_host() : | 1288 GetRenderManager()->pending_render_view_host() : |
1288 GetRenderManager()->current_host(); | 1289 GetRenderManager()->current_host(); |
1289 return dest_rvh->GetSiteInstance(); | 1290 return dest_rvh->GetSiteInstance(); |
1290 } | 1291 } |
1291 | 1292 |
1292 bool WebContentsImpl::IsLoading() const { | 1293 bool WebContentsImpl::IsLoading() const { |
1293 return frame_tree_.IsLoading() && | 1294 return frame_tree_.IsLoading() && |
1294 !(ShowingInterstitialPage() && | 1295 !(ShowingInterstitialPage() && interstitial_page_->pause_throbber()); |
1295 GetRenderManager()->interstitial_page()->pause_throbber()); | |
1296 } | 1296 } |
1297 | 1297 |
1298 bool WebContentsImpl::IsLoadingToDifferentDocument() const { | 1298 bool WebContentsImpl::IsLoadingToDifferentDocument() const { |
1299 return IsLoading() && is_load_to_different_document_; | 1299 return IsLoading() && is_load_to_different_document_; |
1300 } | 1300 } |
1301 | 1301 |
1302 bool WebContentsImpl::IsWaitingForResponse() const { | 1302 bool WebContentsImpl::IsWaitingForResponse() const { |
1303 return waiting_for_response_ && is_load_to_different_document_; | 1303 return waiting_for_response_ && is_load_to_different_document_; |
1304 } | 1304 } |
1305 | 1305 |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1968 // forwarded directly to the widget they arrived on. | 1968 // forwarded directly to the widget they arrived on. |
1969 if (receiving_widget != GetMainFrame()->GetRenderWidgetHost()) | 1969 if (receiving_widget != GetMainFrame()->GetRenderWidgetHost()) |
1970 return receiving_widget; | 1970 return receiving_widget; |
1971 | 1971 |
1972 WebContentsImpl* focused_contents = GetFocusedWebContents(); | 1972 WebContentsImpl* focused_contents = GetFocusedWebContents(); |
1973 | 1973 |
1974 // If the focused WebContents is showing an interstitial, return the | 1974 // If the focused WebContents is showing an interstitial, return the |
1975 // interstitial's widget. | 1975 // interstitial's widget. |
1976 if (focused_contents->ShowingInterstitialPage()) { | 1976 if (focused_contents->ShowingInterstitialPage()) { |
1977 return static_cast<RenderFrameHostImpl*>( | 1977 return static_cast<RenderFrameHostImpl*>( |
1978 focused_contents->GetRenderManager() | 1978 focused_contents->interstitial_page_->GetMainFrame()) |
1979 ->interstitial_page() | |
1980 ->GetMainFrame()) | |
1981 ->GetRenderWidgetHost(); | 1979 ->GetRenderWidgetHost(); |
1982 } | 1980 } |
1983 | 1981 |
1984 // If the focused WebContents is a guest WebContents, then get the focused | 1982 // If the focused WebContents is a guest WebContents, then get the focused |
1985 // frame in the embedder WebContents instead. | 1983 // frame in the embedder WebContents instead. |
1986 FrameTreeNode* focused_frame = nullptr; | 1984 FrameTreeNode* focused_frame = nullptr; |
1987 if (focused_contents->browser_plugin_guest_ && | 1985 if (focused_contents->browser_plugin_guest_ && |
1988 !GuestMode::IsCrossProcessFrameGuest(focused_contents)) { | 1986 !GuestMode::IsCrossProcessFrameGuest(focused_contents)) { |
1989 focused_frame = frame_tree_.GetFocusedFrame(); | 1987 focused_frame = frame_tree_.GetFocusedFrame(); |
1990 } else { | 1988 } else { |
(...skipping 12 matching lines...) Expand all Loading... |
2003 return nullptr; | 2001 return nullptr; |
2004 | 2002 |
2005 return RenderWidgetHostImpl::From(view->GetRenderWidgetHost()); | 2003 return RenderWidgetHostImpl::From(view->GetRenderWidgetHost()); |
2006 } | 2004 } |
2007 | 2005 |
2008 RenderWidgetHostImpl* WebContentsImpl::GetRenderWidgetHostWithPageFocus() { | 2006 RenderWidgetHostImpl* WebContentsImpl::GetRenderWidgetHostWithPageFocus() { |
2009 WebContentsImpl* focused_web_contents = GetFocusedWebContents(); | 2007 WebContentsImpl* focused_web_contents = GetFocusedWebContents(); |
2010 | 2008 |
2011 if (focused_web_contents->ShowingInterstitialPage()) { | 2009 if (focused_web_contents->ShowingInterstitialPage()) { |
2012 return static_cast<RenderFrameHostImpl*>( | 2010 return static_cast<RenderFrameHostImpl*>( |
2013 focused_web_contents->GetRenderManager() | 2011 focused_web_contents->interstitial_page_->GetMainFrame()) |
2014 ->interstitial_page() | |
2015 ->GetMainFrame()) | |
2016 ->GetRenderWidgetHost(); | 2012 ->GetRenderWidgetHost(); |
2017 } | 2013 } |
2018 | 2014 |
2019 return focused_web_contents->GetMainFrame()->GetRenderWidgetHost(); | 2015 return focused_web_contents->GetMainFrame()->GetRenderWidgetHost(); |
2020 } | 2016 } |
2021 | 2017 |
2022 void WebContentsImpl::EnterFullscreenMode(const GURL& origin) { | 2018 void WebContentsImpl::EnterFullscreenMode(const GURL& origin) { |
2023 // This method is being called to enter renderer-initiated fullscreen mode. | 2019 // This method is being called to enter renderer-initiated fullscreen mode. |
2024 // Make sure any existing fullscreen widget is shut down first. | 2020 // Make sure any existing fullscreen widget is shut down first. |
2025 RenderWidgetHostView* const widget_view = GetFullscreenRenderWidgetHostView(); | 2021 RenderWidgetHostView* const widget_view = GetFullscreenRenderWidgetHostView(); |
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2850 } | 2846 } |
2851 | 2847 |
2852 void WebContentsImpl::RenderFrameForInterstitialPageCreated( | 2848 void WebContentsImpl::RenderFrameForInterstitialPageCreated( |
2853 RenderFrameHost* render_frame_host) { | 2849 RenderFrameHost* render_frame_host) { |
2854 for (auto& observer : observers_) | 2850 for (auto& observer : observers_) |
2855 observer.RenderFrameForInterstitialPageCreated(render_frame_host); | 2851 observer.RenderFrameForInterstitialPageCreated(render_frame_host); |
2856 } | 2852 } |
2857 | 2853 |
2858 void WebContentsImpl::AttachInterstitialPage( | 2854 void WebContentsImpl::AttachInterstitialPage( |
2859 InterstitialPageImpl* interstitial_page) { | 2855 InterstitialPageImpl* interstitial_page) { |
2860 DCHECK(interstitial_page); | 2856 DCHECK(!interstitial_page_ && interstitial_page); |
2861 GetRenderManager()->set_interstitial_page(interstitial_page); | 2857 interstitial_page_ = interstitial_page; |
2862 | 2858 |
2863 // Cancel any visible dialogs so that they don't interfere with the | 2859 // Cancel any visible dialogs so that they don't interfere with the |
2864 // interstitial. | 2860 // interstitial. |
2865 CancelActiveAndPendingDialogs(); | 2861 CancelActiveAndPendingDialogs(); |
2866 | 2862 |
2867 for (auto& observer : observers_) | 2863 for (auto& observer : observers_) |
2868 observer.DidAttachInterstitialPage(); | 2864 observer.DidAttachInterstitialPage(); |
2869 | 2865 |
2870 // Stop the throbber if needed while the interstitial page is shown. | 2866 // Stop the throbber if needed while the interstitial page is shown. |
2871 if (frame_tree_.IsLoading()) | 2867 if (frame_tree_.IsLoading()) |
2872 LoadingStateChanged(true, true, nullptr); | 2868 LoadingStateChanged(true, true, nullptr); |
2873 | 2869 |
2874 // Connect to outer WebContents if necessary. | 2870 // Connect to outer WebContents if necessary. |
2875 if (node_.OuterContentsFrameTreeNode()) { | 2871 if (node_.OuterContentsFrameTreeNode()) { |
2876 if (GetRenderManager()->GetProxyToOuterDelegate()) { | 2872 if (GetRenderManager()->GetProxyToOuterDelegate()) { |
2877 DCHECK( | 2873 DCHECK( |
2878 static_cast<RenderWidgetHostViewBase*>(interstitial_page->GetView()) | 2874 static_cast<RenderWidgetHostViewBase*>(interstitial_page->GetView()) |
2879 ->IsRenderWidgetHostViewChildFrame()); | 2875 ->IsRenderWidgetHostViewChildFrame()); |
2880 RenderWidgetHostViewChildFrame* view = | 2876 RenderWidgetHostViewChildFrame* view = |
2881 static_cast<RenderWidgetHostViewChildFrame*>( | 2877 static_cast<RenderWidgetHostViewChildFrame*>( |
2882 interstitial_page->GetView()); | 2878 interstitial_page->GetView()); |
2883 GetRenderManager()->SetRWHViewForInnerContents(view); | 2879 GetRenderManager()->SetRWHViewForInnerContents(view); |
2884 } | 2880 } |
2885 } | 2881 } |
2886 } | 2882 } |
2887 | 2883 |
2888 void WebContentsImpl::DidProceedOnInterstitial() { | 2884 void WebContentsImpl::DidProceedOnInterstitial() { |
2889 // The interstitial page should no longer be pausing the throbber. | 2885 // The interstitial page should no longer be pausing the throbber. |
2890 DCHECK(!(ShowingInterstitialPage() && | 2886 DCHECK(!(ShowingInterstitialPage() && interstitial_page_->pause_throbber())); |
2891 GetRenderManager()->interstitial_page()->pause_throbber())); | |
2892 | 2887 |
2893 // Restart the throbber now that the interstitial page no longer pauses it. | 2888 // Restart the throbber now that the interstitial page no longer pauses it. |
2894 if (ShowingInterstitialPage() && frame_tree_.IsLoading()) | 2889 if (ShowingInterstitialPage() && frame_tree_.IsLoading()) |
2895 LoadingStateChanged(true, true, nullptr); | 2890 LoadingStateChanged(true, true, nullptr); |
2896 } | 2891 } |
2897 | 2892 |
2898 void WebContentsImpl::DetachInterstitialPage() { | 2893 void WebContentsImpl::DetachInterstitialPage() { |
2899 // Disconnect from outer WebContents if necessary. | 2894 // Disconnect from outer WebContents if necessary. |
2900 if (node_.OuterContentsFrameTreeNode()) { | 2895 if (node_.OuterContentsFrameTreeNode()) { |
2901 if (GetRenderManager()->GetProxyToOuterDelegate()) { | 2896 if (GetRenderManager()->GetProxyToOuterDelegate()) { |
2902 DCHECK(static_cast<RenderWidgetHostViewBase*>( | 2897 DCHECK(static_cast<RenderWidgetHostViewBase*>( |
2903 GetRenderManager()->current_frame_host()->GetView()) | 2898 GetRenderManager()->current_frame_host()->GetView()) |
2904 ->IsRenderWidgetHostViewChildFrame()); | 2899 ->IsRenderWidgetHostViewChildFrame()); |
2905 RenderWidgetHostViewChildFrame* view = | 2900 RenderWidgetHostViewChildFrame* view = |
2906 static_cast<RenderWidgetHostViewChildFrame*>( | 2901 static_cast<RenderWidgetHostViewChildFrame*>( |
2907 GetRenderManager()->current_frame_host()->GetView()); | 2902 GetRenderManager()->current_frame_host()->GetView()); |
2908 GetRenderManager()->SetRWHViewForInnerContents(view); | 2903 GetRenderManager()->SetRWHViewForInnerContents(view); |
2909 } | 2904 } |
2910 } | 2905 } |
2911 | 2906 |
2912 bool interstitial_pausing_throbber = | 2907 bool interstitial_pausing_throbber = |
2913 ShowingInterstitialPage() && | 2908 ShowingInterstitialPage() && interstitial_page_->pause_throbber(); |
2914 GetRenderManager()->interstitial_page()->pause_throbber(); | |
2915 if (ShowingInterstitialPage()) | 2909 if (ShowingInterstitialPage()) |
2916 GetRenderManager()->remove_interstitial_page(); | 2910 interstitial_page_ = nullptr; |
2917 for (auto& observer : observers_) | 2911 for (auto& observer : observers_) |
2918 observer.DidDetachInterstitialPage(); | 2912 observer.DidDetachInterstitialPage(); |
2919 | 2913 |
2920 // Restart the throbber if needed now that the interstitial page is going | 2914 // Restart the throbber if needed now that the interstitial page is going |
2921 // away. | 2915 // away. |
2922 if (interstitial_pausing_throbber && frame_tree_.IsLoading()) | 2916 if (interstitial_pausing_throbber && frame_tree_.IsLoading()) |
2923 LoadingStateChanged(true, true, nullptr); | 2917 LoadingStateChanged(true, true, nullptr); |
2924 } | 2918 } |
2925 | 2919 |
2926 void WebContentsImpl::SetHistoryOffsetAndLength(int history_offset, | 2920 void WebContentsImpl::SetHistoryOffsetAndLength(int history_offset, |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3119 void WebContentsImpl::StoreFocus() { | 3113 void WebContentsImpl::StoreFocus() { |
3120 view_->StoreFocus(); | 3114 view_->StoreFocus(); |
3121 } | 3115 } |
3122 | 3116 |
3123 void WebContentsImpl::RestoreFocus() { | 3117 void WebContentsImpl::RestoreFocus() { |
3124 view_->RestoreFocus(); | 3118 view_->RestoreFocus(); |
3125 } | 3119 } |
3126 | 3120 |
3127 void WebContentsImpl::FocusThroughTabTraversal(bool reverse) { | 3121 void WebContentsImpl::FocusThroughTabTraversal(bool reverse) { |
3128 if (ShowingInterstitialPage()) { | 3122 if (ShowingInterstitialPage()) { |
3129 GetRenderManager()->interstitial_page()->FocusThroughTabTraversal(reverse); | 3123 interstitial_page_->FocusThroughTabTraversal(reverse); |
3130 return; | 3124 return; |
3131 } | 3125 } |
3132 RenderWidgetHostView* const fullscreen_view = | 3126 RenderWidgetHostView* const fullscreen_view = |
3133 GetFullscreenRenderWidgetHostView(); | 3127 GetFullscreenRenderWidgetHostView(); |
3134 if (fullscreen_view) { | 3128 if (fullscreen_view) { |
3135 fullscreen_view->Focus(); | 3129 fullscreen_view->Focus(); |
3136 return; | 3130 return; |
3137 } | 3131 } |
3138 GetRenderViewHost()->SetInitialFocus(reverse); | 3132 GetRenderViewHost()->SetInitialFocus(reverse); |
3139 } | 3133 } |
3140 | 3134 |
3141 bool WebContentsImpl::ShowingInterstitialPage() const { | 3135 bool WebContentsImpl::ShowingInterstitialPage() const { |
3142 return GetRenderManager()->interstitial_page() != NULL; | 3136 return interstitial_page_ != nullptr; |
3143 } | 3137 } |
3144 | 3138 |
3145 InterstitialPage* WebContentsImpl::GetInterstitialPage() const { | 3139 InterstitialPage* WebContentsImpl::GetInterstitialPage() const { |
3146 return GetRenderManager()->interstitial_page(); | 3140 return interstitial_page_; |
3147 } | 3141 } |
3148 | 3142 |
3149 bool WebContentsImpl::IsSavable() { | 3143 bool WebContentsImpl::IsSavable() { |
3150 // WebKit creates Document object when MIME type is application/xhtml+xml, | 3144 // WebKit creates Document object when MIME type is application/xhtml+xml, |
3151 // so we also support this MIME type. | 3145 // so we also support this MIME type. |
3152 return contents_mime_type_ == "text/html" || | 3146 return contents_mime_type_ == "text/html" || |
3153 contents_mime_type_ == "text/xml" || | 3147 contents_mime_type_ == "text/xml" || |
3154 contents_mime_type_ == "application/xhtml+xml" || | 3148 contents_mime_type_ == "application/xhtml+xml" || |
3155 contents_mime_type_ == "text/plain" || | 3149 contents_mime_type_ == "text/plain" || |
3156 contents_mime_type_ == "text/css" || | 3150 contents_mime_type_ == "text/css" || |
(...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4268 loading_last_progress_update_ = base::TimeTicks(); | 4262 loading_last_progress_update_ = base::TimeTicks(); |
4269 } | 4263 } |
4270 | 4264 |
4271 // Notifies the RenderWidgetHost instance about the fact that the page is | 4265 // Notifies the RenderWidgetHost instance about the fact that the page is |
4272 // loading, or done loading. | 4266 // loading, or done loading. |
4273 void WebContentsImpl::LoadingStateChanged(bool to_different_document, | 4267 void WebContentsImpl::LoadingStateChanged(bool to_different_document, |
4274 bool due_to_interstitial, | 4268 bool due_to_interstitial, |
4275 LoadNotificationDetails* details) { | 4269 LoadNotificationDetails* details) { |
4276 // Do not send notifications about loading changes in the FrameTree while the | 4270 // Do not send notifications about loading changes in the FrameTree while the |
4277 // interstitial page is pausing the throbber. | 4271 // interstitial page is pausing the throbber. |
4278 if (ShowingInterstitialPage() && | 4272 if (ShowingInterstitialPage() && interstitial_page_->pause_throbber() && |
4279 GetRenderManager()->interstitial_page()->pause_throbber() && | |
4280 !due_to_interstitial) { | 4273 !due_to_interstitial) { |
4281 return; | 4274 return; |
4282 } | 4275 } |
4283 | 4276 |
4284 bool is_loading = IsLoading(); | 4277 bool is_loading = IsLoading(); |
4285 | 4278 |
4286 if (!is_loading) { | 4279 if (!is_loading) { |
4287 load_state_ = net::LoadStateWithParam(net::LOAD_STATE_IDLE, | 4280 load_state_ = net::LoadStateWithParam(net::LOAD_STATE_IDLE, |
4288 base::string16()); | 4281 base::string16()); |
4289 load_state_host_.clear(); | 4282 load_state_host_.clear(); |
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4984 if (old_contents) | 4977 if (old_contents) |
4985 old_contents->GetMainFrame()->GetRenderWidgetHost()->SetPageFocus(false); | 4978 old_contents->GetMainFrame()->GetRenderWidgetHost()->SetPageFocus(false); |
4986 | 4979 |
4987 // Make sure the outer web contents knows our frame is focused. Otherwise, the | 4980 // Make sure the outer web contents knows our frame is focused. Otherwise, the |
4988 // outer renderer could have the element before or after the frame element | 4981 // outer renderer could have the element before or after the frame element |
4989 // focused which would return early without actually advancing focus. | 4982 // focused which would return early without actually advancing focus. |
4990 if (GetRenderManager()->GetProxyToOuterDelegate()) | 4983 if (GetRenderManager()->GetProxyToOuterDelegate()) |
4991 GetRenderManager()->GetProxyToOuterDelegate()->SetFocusedFrame(); | 4984 GetRenderManager()->GetProxyToOuterDelegate()->SetFocusedFrame(); |
4992 | 4985 |
4993 if (ShowingInterstitialPage()) { | 4986 if (ShowingInterstitialPage()) { |
4994 static_cast<RenderFrameHostImpl*>( | 4987 static_cast<RenderFrameHostImpl*>(interstitial_page_->GetMainFrame()) |
4995 GetRenderManager()->interstitial_page()->GetMainFrame()) | |
4996 ->GetRenderWidgetHost() | 4988 ->GetRenderWidgetHost() |
4997 ->SetPageFocus(true); | 4989 ->SetPageFocus(true); |
4998 } else { | 4990 } else { |
4999 GetMainFrame()->GetRenderWidgetHost()->SetPageFocus(true); | 4991 GetMainFrame()->GetRenderWidgetHost()->SetPageFocus(true); |
5000 } | 4992 } |
5001 } | 4993 } |
5002 | 4994 |
5003 void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, | 4995 void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, |
5004 SiteInstance* source) { | 4996 SiteInstance* source) { |
5005 SetAsFocusedWebContentsIfNecessary(); | 4997 SetAsFocusedWebContentsIfNecessary(); |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5194 std::unique_ptr<WebUIImpl> WebContentsImpl::CreateWebUIForRenderFrameHost( | 5186 std::unique_ptr<WebUIImpl> WebContentsImpl::CreateWebUIForRenderFrameHost( |
5195 const GURL& url) { | 5187 const GURL& url) { |
5196 return CreateWebUI(url, std::string()); | 5188 return CreateWebUI(url, std::string()); |
5197 } | 5189 } |
5198 | 5190 |
5199 NavigationEntry* | 5191 NavigationEntry* |
5200 WebContentsImpl::GetLastCommittedNavigationEntryForRenderManager() { | 5192 WebContentsImpl::GetLastCommittedNavigationEntryForRenderManager() { |
5201 return controller_.GetLastCommittedEntry(); | 5193 return controller_.GetLastCommittedEntry(); |
5202 } | 5194 } |
5203 | 5195 |
| 5196 InterstitialPageImpl* WebContentsImpl::GetInterstitialForRenderManager() { |
| 5197 return interstitial_page_; |
| 5198 } |
| 5199 |
5204 void WebContentsImpl::CreateRenderWidgetHostViewForRenderManager( | 5200 void WebContentsImpl::CreateRenderWidgetHostViewForRenderManager( |
5205 RenderViewHost* render_view_host) { | 5201 RenderViewHost* render_view_host) { |
5206 RenderWidgetHostViewBase* rwh_view = | 5202 RenderWidgetHostViewBase* rwh_view = |
5207 view_->CreateViewForWidget(render_view_host->GetWidget(), false); | 5203 view_->CreateViewForWidget(render_view_host->GetWidget(), false); |
5208 | 5204 |
5209 // Now that the RenderView has been created, we need to tell it its size. | 5205 // Now that the RenderView has been created, we need to tell it its size. |
5210 if (rwh_view) | 5206 if (rwh_view) |
5211 rwh_view->SetSize(GetSizeForNewRenderView()); | 5207 rwh_view->SetSize(GetSizeForNewRenderView()); |
5212 } | 5208 } |
5213 | 5209 |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5682 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host); | 5678 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host); |
5683 if (!render_view_host) | 5679 if (!render_view_host) |
5684 continue; | 5680 continue; |
5685 render_view_host_set.insert(render_view_host); | 5681 render_view_host_set.insert(render_view_host); |
5686 } | 5682 } |
5687 for (RenderViewHost* render_view_host : render_view_host_set) | 5683 for (RenderViewHost* render_view_host : render_view_host_set) |
5688 render_view_host->OnWebkitPreferencesChanged(); | 5684 render_view_host->OnWebkitPreferencesChanged(); |
5689 } | 5685 } |
5690 | 5686 |
5691 } // namespace content | 5687 } // namespace content |
OLD | NEW |