summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-06 18:12:56 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-06 18:12:56 +0000
commitbdff416f9c0fe3c07c2fc1de5319991db2bbf549 (patch)
treed4b3071da2c0fce49aa663efa2135fa9feccf826
parentf92ce2b905ba078e4dab8afa08375bc96da2505f (diff)
downloadchromium_src-bdff416f9c0fe3c07c2fc1de5319991db2bbf549.zip
chromium_src-bdff416f9c0fe3c07c2fc1de5319991db2bbf549.tar.gz
chromium_src-bdff416f9c0fe3c07c2fc1de5319991db2bbf549.tar.bz2
Split ContentBrowserClient::RenderViewHostCreated
Previously, ChromeContentBrowserClient::RenderViewCreated was attempting to send a routed message before the ViewMsg_New had been sent to create the destination. This message was informing the RenderView that it was an interstitial and therefore should allow Javascript regardless of the content settings. Since this message wasn't getting routed, interstitials broke when Javascript was disabled. BUG=96137 TEST=Disable Javascript in the content policy settings. Then navigate to https://foo.bar.appspot.com (or any other site with a certificate error) and ensure that the interstitial displays correctly. Review URL: https://chromiumcodereview.appspot.com/9599023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125181 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chrome_content_browser_client.cc6
-rw-r--r--chrome/browser/renderer_host/chrome_render_view_host_observer.cc6
2 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 4803a4e..6697d68 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -370,12 +370,6 @@ void ChromeContentBrowserClient::RenderViewHostCreated(
new ChromeRenderViewHostObserver(render_view_host,
profile->GetNetworkPredictor());
new ExtensionMessageHandler(render_view_host);
-
- if (render_view_host->GetDelegate()->GetRenderViewType() ==
- content::VIEW_TYPE_INTERSTITIAL_PAGE) {
- render_view_host->Send(new ChromeViewMsg_SetAsInterstitial(
- render_view_host->GetRoutingID()));
- }
}
void ChromeContentBrowserClient::RenderProcessHostCreated(
diff --git a/chrome/browser/renderer_host/chrome_render_view_host_observer.cc b/chrome/browser/renderer_host/chrome_render_view_host_observer.cc
index 4d9444e..4877bf4 100644
--- a/chrome/browser/renderer_host/chrome_render_view_host_observer.cc
+++ b/chrome/browser/renderer_host/chrome_render_view_host_observer.cc
@@ -41,6 +41,12 @@ ChromeRenderViewHostObserver::~ChromeRenderViewHostObserver() {
void ChromeRenderViewHostObserver::RenderViewHostInitialized() {
InitRenderViewForExtensions();
+
+ if (render_view_host()->GetDelegate()->GetRenderViewType() ==
+ content::VIEW_TYPE_INTERSTITIAL_PAGE) {
+ render_view_host()->Send(new ChromeViewMsg_SetAsInterstitial(
+ render_view_host()->GetRoutingID()));
+ }
}
void ChromeRenderViewHostObserver::RenderViewHostDestroyed(