Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1118)

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 14080004: Remove some chrome-specific methods from content::WebUI. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix browser_test Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/browser/webui/web_ui_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl.cc
===================================================================
--- content/browser/web_contents/web_contents_impl.cc (revision 193436)
+++ content/browser/web_contents/web_contents_impl.cc (working copy)
@@ -1898,46 +1898,6 @@
return content_restrictions_;
}
-WebUI* WebContentsImpl::GetWebUIForCurrentState() {
- // When there is a pending navigation entry, we want to use the pending WebUI
- // that goes along with it to control the basic flags. For example, we want to
- // show the pending URL in the URL bar, so we want the display_url flag to
- // be from the pending entry.
- //
- // The confusion comes because there are multiple possibilities for the
- // initial load in a tab as a side effect of the way the RenderViewHostManager
- // works.
- //
- // - For the very first tab the load looks "normal". The new tab Web UI is
- // the pending one, and we want it to apply here.
- //
- // - For subsequent new tabs, they'll get a new SiteInstance which will then
- // get switched to the one previously associated with the new tab pages.
- // This switching will cause the manager to commit the RVH/WebUI. So we'll
- // have a committed Web UI in this case.
- //
- // This condition handles all of these cases:
- //
- // - First load in first tab: no committed nav entry + pending nav entry +
- // pending dom ui:
- // -> Use pending Web UI if any.
- //
- // - First load in second tab: no committed nav entry + pending nav entry +
- // no pending Web UI:
- // -> Use the committed Web UI if any.
- //
- // - Second navigation in any tab: committed nav entry + pending nav entry:
- // -> Use pending Web UI if any.
- //
- // - Normal state with no load: committed nav entry + no pending nav entry:
- // -> Use committed Web UI.
- if (controller_.GetPendingEntry() &&
- (controller_.GetLastCommittedEntry() ||
- render_manager_.pending_web_ui()))
- return render_manager_.pending_web_ui();
- return render_manager_.web_ui();
-}
-
bool WebContentsImpl::GotResponseToLockMouseRequest(bool allowed) {
return GetRenderViewHost() ?
GetRenderViewHostImpl()->GotResponseToLockMouseRequest(allowed) : false;
@@ -1971,9 +1931,6 @@
}
bool WebContentsImpl::FocusLocationBarByDefault() {
- WebUI* web_ui = GetWebUIForCurrentState();
- if (web_ui)
- return web_ui->ShouldFocusLocationBarByDefault();
NavigationEntry* entry = controller_.GetActiveEntry();
if (entry && entry->GetURL() == GURL(chrome::kAboutBlankURL))
return true;
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/browser/webui/web_ui_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698