Chromium Code Reviews| Index: chrome/browser/ui/browser.cc |
| diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
| index 64ab742dcf3ab7a1e8945781e1bf59d60556fb78..3def46d53261b0f721364b1b7824791a18c19670 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); |
| + // Don't append the app name to window titles on app frames and app popups or |
| + // for accessibility. |
|
sky
2016/06/27 16:11:38
nit: update accessibility.
varkha
2016/06/27 16:37:40
Done.
|
| + return (!is_app() && include_app_name) ? |
| + l10n_util::GetStringFUTF16(IDS_BROWSER_WINDOW_TITLE_FORMAT, title): |
| + title; |
| } |
| // static |