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

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 (comment) 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
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 64ab742dcf3ab7a1e8945781e1bf59d60556fb78..2b43c8682da1a62750a51b0dfa0f6faec86ee971 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -585,7 +585,8 @@ gfx::Image Browser::GetCurrentPageIcon() const {
return favicon_driver ? favicon_driver->GetFavicon() : gfx::Image();
}
-base::string16 Browser::GetWindowTitleForCurrentTab() const {
+base::string16 Browser::GetWindowTitleForCurrentTab(
+ bool include_app_name) const {
WebContents* contents = tab_strip_model_->GetActiveWebContents();
base::string16 title;
@@ -602,15 +603,15 @@ 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() ?
- title :
- l10n_util::GetStringFUTF16(IDS_BROWSER_WINDOW_TITLE_FORMAT, title);
+ // Include the app name in window titles for tabbed browser windows when
+ // requested with |include_app_name|.
+ return (!is_app() && include_app_name) ?
+ l10n_util::GetStringFUTF16(IDS_BROWSER_WINDOW_TITLE_FORMAT, title):
+ title;
}
// static
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698