summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authormichaelbai@chromium.org <michaelbai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-29 14:26:33 +0000
committermichaelbai@chromium.org <michaelbai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-29 14:26:33 +0000
commite770b1e9543e3c524c5fbc664f966c04220a1adc (patch)
tree7941d1bb3466fda8b927d6005f2d64e19c602d57 /content
parent542ce1a8616598262fa80422240272b687ce6e50 (diff)
downloadchromium_src-e770b1e9543e3c524c5fbc664f966c04220a1adc.zip
chromium_src-e770b1e9543e3c524c5fbc664f966c04220a1adc.tar.gz
chromium_src-e770b1e9543e3c524c5fbc664f966c04220a1adc.tar.bz2
WebContentObserver::RenderViewCreated should be called for empty document.
JavaBridgeDispatcherHostManager uses RenderViewCreated() to register JavaScript interface. Also WebView uses this callback to do some initial settings. BUG=273164 Review URL: https://chromiumcodereview.appspot.com/23600009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220291 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/web_contents/web_contents_impl.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 25b9cf4..578f900 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2873,16 +2873,14 @@ void WebContentsImpl::RenderViewCreated(RenderViewHost* render_view_host) {
NOTIFICATION_WEB_CONTENTS_RENDER_VIEW_HOST_CREATED,
Source<WebContents>(this),
Details<RenderViewHost>(render_view_host));
- NavigationEntry* entry = controller_.GetActiveEntry();
- if (!entry)
- return;
// When we're creating views, we're still doing initial setup, so we always
// use the pending Web UI rather than any possibly existing committed one.
if (render_manager_.pending_web_ui())
render_manager_.pending_web_ui()->RenderViewCreated(render_view_host);
- if (entry->IsViewSourceMode()) {
+ NavigationEntry* entry = controller_.GetActiveEntry();
+ if (entry && entry->IsViewSourceMode()) {
// Put the renderer in view source mode.
render_view_host->Send(
new ViewMsg_EnableViewSourceMode(render_view_host->GetRoutingID()));