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

Unified Diff: chrome/browser/extensions/extension_web_ui.cc

Issue 12463042: Shows chrome-extension urls and greys out the whole url. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed comment nits Created 7 years, 9 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/extensions/extension_web_ui.cc
diff --git a/chrome/browser/extensions/extension_web_ui.cc b/chrome/browser/extensions/extension_web_ui.cc
index d37df1d6e84b99cd241f9fc0c7c41070161baac1..e02a8e484d48f4dfd17370873cee190320d0283e 100644
--- a/chrome/browser/extensions/extension_web_ui.cc
+++ b/chrome/browser/extensions/extension_web_ui.cc
@@ -131,9 +131,9 @@ ExtensionWebUI::ExtensionWebUI(content::WebUI* web_ui, const GURL& url)
const Extension* extension =
service->extensions()->GetExtensionOrAppByURL(ExtensionURLInfo(url));
DCHECK(extension);
- // Only hide the url for internal pages (e.g. chrome-extension or packaged
- // component apps like bookmark manager.
- bool should_hide_url = !extension->is_hosted_app();
+ // Only grey out the entire url for internal pages (e.g. chrome-extension or
+ // packaged component apps like bookmark manager).
+ bool should_grey_out_url = !extension->is_hosted_app();
// The base class defaults to enabling WebUI bindings, but we don't need
// those (this is also reflected in ChromeWebUIControllerFactory::
@@ -150,13 +150,14 @@ ExtensionWebUI::ExtensionWebUI(content::WebUI* web_ui, const GURL& url)
if (effective_url.host() == chrome::kChromeUINewTabHost) {
web_ui->FocusLocationBarByDefault();
} else {
- // Current behavior of other chrome:// pages is to display the URL.
- should_hide_url = false;
+ // Current behavior of other chrome:// pages is to emphasize the host,
+ // which means we shouldn't grey out the entire url.
+ should_grey_out_url = false;
}
}
- if (should_hide_url)
- web_ui->HideURL();
+ if (should_grey_out_url)
+ web_ui->GreyOutURL();
web_ui->SetBindings(bindings);

Powered by Google App Engine
This is Rietveld 408576698