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

Unified Diff: chrome/browser/ui/browser.cc

Issue 14080004: Remove some chrome-specific methods from content::WebUI. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments and fix null check 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
Index: chrome/browser/ui/browser.cc
===================================================================
--- chrome/browser/ui/browser.cc (revision 193436)
+++ chrome/browser/ui/browser.cc (working copy)
@@ -149,6 +149,7 @@
#include "chrome/common/profiling.h"
#include "chrome/common/search_types.h"
#include "chrome/common/startup_metric_utils.h"
+#include "chrome/common/url_constants.h"
#include "chrome/common/web_apps.h"
#include "content/public/browser/color_chooser.h"
#include "content/public/browser/devtools_manager.h"
@@ -1400,6 +1401,12 @@
bool Browser::ShouldFocusLocationBarByDefault(WebContents* source) {
const content::NavigationEntry* entry =
source->GetController().GetActiveEntry();
+ if (entry &&
+ entry->GetURL().SchemeIs(chrome::kChromeUIScheme) &&
+ entry->GetURL().host() == chrome::kChromeUINewTabHost) {
+ return true;
+ }
+
return chrome::NavEntryIsInstantNTP(source, entry);
}

Powered by Google App Engine
This is Rietveld 408576698