diff options
author | michaelbai@chromium.org <michaelbai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-29 14:26:33 +0000 |
---|---|---|
committer | michaelbai@chromium.org <michaelbai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-29 14:26:33 +0000 |
commit | e770b1e9543e3c524c5fbc664f966c04220a1adc (patch) | |
tree | 7941d1bb3466fda8b927d6005f2d64e19c602d57 /content | |
parent | 542ce1a8616598262fa80422240272b687ce6e50 (diff) | |
download | chromium_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.cc | 6 |
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())); |