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

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

Issue 2093963003: [ash-md] Uses 'Chrome - <title>' format for browser windows in overview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [ash-md] Uses 'Chrome - <title>' format for browser windows in overview (accessibility fixes) Created 4 years, 6 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
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 64ab742dcf3ab7a1e8945781e1bf59d60556fb78..c6b435ecfa351dee20e5e7fe5cb8d3c599b5509f 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -585,7 +585,7 @@ gfx::Image Browser::GetCurrentPageIcon() const {
return favicon_driver ? favicon_driver->GetFavicon() : gfx::Image();
}
-base::string16 Browser::GetWindowTitleForCurrentTab() const {
+base::string16 Browser::GetWindowTitleForCurrentTab(bool accessible) const {
WebContents* contents = tab_strip_model_->GetActiveWebContents();
base::string16 title;
@@ -602,13 +602,13 @@ base::string16 Browser::GetWindowTitleForCurrentTab() const {
if (title.empty())
title = CoreTabHelper::GetDefaultTitle();
-#if defined(OS_MACOSX) || defined(USE_ASH)
- // On Mac and Ash, we don't want to suffix the page title with the application
- // name.
+#if defined(OS_MACOSX)
+ // On Mac, we don't want to suffix the page title with the application name.
return title;
#endif
- // Don't append the app name to window titles on app frames and app popups
- return is_app() ?
+ // Don't append the app name to window titles on app frames and app popups or
+ // for accessibility.
+ return (is_app() || accessible) ?
title :
l10n_util::GetStringFUTF16(IDS_BROWSER_WINDOW_TITLE_FORMAT, title);
}

Powered by Google App Engine
This is Rietveld 408576698