diff options
3 files changed, 10 insertions, 36 deletions
diff --git a/android_webview/native/aw_contents_io_thread_client_impl.cc b/android_webview/native/aw_contents_io_thread_client_impl.cc index 0cd9f20..6e24d9a 100644 --- a/android_webview/native/aw_contents_io_thread_client_impl.cc +++ b/android_webview/native/aw_contents_io_thread_client_impl.cc @@ -109,8 +109,6 @@ class ClientMapEntryUpdater : public content::WebContentsObserver { jobject jdelegate); virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; - virtual void RenderViewForInterstitialPageCreated( - RenderViewHost* render_view_host) OVERRIDE; virtual void RenderViewDeleted(RenderViewHost* render_view_host) OVERRIDE; virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE; @@ -138,11 +136,6 @@ void ClientMapEntryUpdater::RenderViewCreated(RenderViewHost* rvh) { GetRenderViewHostIdPair(rvh), client_data); } -void ClientMapEntryUpdater::RenderViewForInterstitialPageCreated( - RenderViewHost* rvh) { - RenderViewCreated(rvh); -} - void ClientMapEntryUpdater::RenderViewDeleted(RenderViewHost* rvh) { RvhToIoThreadClientMap::GetInstance()->Erase(GetRenderViewHostIdPair(rvh)); } diff --git a/chrome/browser/content_settings/tab_specific_content_settings.cc b/chrome/browser/content_settings/tab_specific_content_settings.cc index 9c019ba..ee562f3 100644 --- a/chrome/browser/content_settings/tab_specific_content_settings.cc +++ b/chrome/browser/content_settings/tab_specific_content_settings.cc @@ -29,7 +29,6 @@ #include "content/public/browser/navigation_entry.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/render_view_host.h" -#include "content/public/browser/render_view_host_observer.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_delegate.h" #include "net/cookies/canonical_cookie.h" @@ -43,22 +42,6 @@ using content::WebContents; DEFINE_WEB_CONTENTS_USER_DATA_KEY(TabSpecificContentSettings); -namespace { - -class InterstitialHostObserver : public content::RenderViewHostObserver { - public: - explicit InterstitialHostObserver(RenderViewHost* rvh) - : content::RenderViewHostObserver(rvh) {} - - // content::RenderViewHostObserver overrides. - virtual void RenderViewHostInitialized() OVERRIDE { - Send(new ChromeViewMsg_SetAsInterstitial(routing_id())); - delete this; - } -}; - -} // namespace - TabSpecificContentSettings::SiteDataObserver::SiteDataObserver( TabSpecificContentSettings* tab_specific_content_settings) : tab_specific_content_settings_(tab_specific_content_settings) { @@ -664,8 +647,8 @@ void TabSpecificContentSettings::SetPepperBrokerAllowed(bool allowed) { void TabSpecificContentSettings::RenderViewForInterstitialPageCreated( RenderViewHost* render_view_host) { // We want to tell the renderer-side code to ignore content settings for this - // page but we must wait until the RenderView is created. - new InterstitialHostObserver(render_view_host); + // page. + Send(new ChromeViewMsg_SetAsInterstitial(routing_id())); } bool TabSpecificContentSettings::OnMessageReceived( diff --git a/content/browser/web_contents/interstitial_page_impl.cc b/content/browser/web_contents/interstitial_page_impl.cc index 5fa17ff..6489569 100644 --- a/content/browser/web_contents/interstitial_page_impl.cc +++ b/content/browser/web_contents/interstitial_page_impl.cc @@ -501,16 +501,13 @@ RenderViewHost* InterstitialPageImpl::CreateRenderViewHost() { session_storage_namespace_ = new SessionStorageNamespaceImpl(dom_storage_context); - RenderViewHost* render_view_host = - RenderViewHostFactory::Create(site_instance.get(), - this, - this, - MSG_ROUTING_NONE, - MSG_ROUTING_NONE, - false, - false); - web_contents_->RenderViewForInterstitialPageCreated(render_view_host); - return render_view_host; + return RenderViewHostFactory::Create(site_instance.get(), + this, + this, + MSG_ROUTING_NONE, + MSG_ROUTING_NONE, + false, + false); } WebContentsView* InterstitialPageImpl::CreateWebContentsView() { @@ -529,6 +526,7 @@ WebContentsView* InterstitialPageImpl::CreateWebContentsView() { render_view_host_->CreateRenderView(string16(), MSG_ROUTING_NONE, max_page_id); + web_contents_->RenderViewForInterstitialPageCreated(render_view_host_); view->SetSize(web_contents_view->GetContainerSize()); // Don't show the interstitial until we have navigated to it. view->Hide(); |