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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_cocoa.mm

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, 5 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h" 5 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #import "base/mac/sdk_forward_declarations.h" 10 #import "base/mac/sdk_forward_declarations.h"
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 void BrowserWindowCocoa::UpdateTitleBar() { 301 void BrowserWindowCocoa::UpdateTitleBar() {
302 NSString* newTitle = WindowTitle(); 302 NSString* newTitle = WindowTitle();
303 303
304 pending_window_title_.reset([BrowserWindowUtils 304 pending_window_title_.reset([BrowserWindowUtils
305 scheduleReplaceOldTitle:pending_window_title_.get() 305 scheduleReplaceOldTitle:pending_window_title_.get()
306 withNewTitle:newTitle 306 withNewTitle:newTitle
307 forWindow:window()]); 307 forWindow:window()]);
308 } 308 }
309 309
310 NSString* BrowserWindowCocoa::WindowTitle() { 310 NSString* BrowserWindowCocoa::WindowTitle() {
311 const bool include_app_name = true;
311 if (alert_state_ == TabAlertState::AUDIO_PLAYING) { 312 if (alert_state_ == TabAlertState::AUDIO_PLAYING) {
312 return l10n_util::GetNSStringF(IDS_WINDOW_AUDIO_PLAYING_MAC, 313 return l10n_util::GetNSStringF(IDS_WINDOW_AUDIO_PLAYING_MAC,
313 browser_->GetWindowTitleForCurrentTab(), 314 browser_->GetWindowTitleForCurrentTab(
315 include_app_name),
314 base::SysNSStringToUTF16(@"🔊")); 316 base::SysNSStringToUTF16(@"🔊"));
315 } else if (alert_state_ == TabAlertState::AUDIO_MUTING) { 317 } else if (alert_state_ == TabAlertState::AUDIO_MUTING) {
316 return l10n_util::GetNSStringF(IDS_WINDOW_AUDIO_MUTING_MAC, 318 return l10n_util::GetNSStringF(IDS_WINDOW_AUDIO_MUTING_MAC,
317 browser_->GetWindowTitleForCurrentTab(), 319 browser_->GetWindowTitleForCurrentTab(
320 include_app_name),
318 base::SysNSStringToUTF16(@"🔇")); 321 base::SysNSStringToUTF16(@"🔇"));
319 } 322 }
320 return base::SysUTF16ToNSString(browser_->GetWindowTitleForCurrentTab()); 323 return base::SysUTF16ToNSString(
324 browser_->GetWindowTitleForCurrentTab(include_app_name));
321 } 325 }
322 326
323 void BrowserWindowCocoa::BookmarkBarStateChanged( 327 void BrowserWindowCocoa::BookmarkBarStateChanged(
324 BookmarkBar::AnimateChangeType change_type) { 328 BookmarkBar::AnimateChangeType change_type) {
325 [[controller_ bookmarkBarController] 329 [[controller_ bookmarkBarController]
326 updateState:browser_->bookmark_bar_state() 330 updateState:browser_->bookmark_bar_state()
327 changeType:change_type]; 331 changeType:change_type];
328 } 332 }
329 333
330 void BrowserWindowCocoa::UpdateDevTools() { 334 void BrowserWindowCocoa::UpdateDevTools() {
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 ExclusiveAccessContext* BrowserWindowCocoa::GetExclusiveAccessContext() { 841 ExclusiveAccessContext* BrowserWindowCocoa::GetExclusiveAccessContext() {
838 return [controller_ exclusiveAccessController]; 842 return [controller_ exclusiveAccessController];
839 } 843 }
840 844
841 void BrowserWindowCocoa::ShowImeWarningBubble( 845 void BrowserWindowCocoa::ShowImeWarningBubble(
842 const extensions::Extension* extension, 846 const extensions::Extension* extension,
843 const base::Callback<void(ImeWarningBubblePermissionStatus status)>& 847 const base::Callback<void(ImeWarningBubblePermissionStatus status)>&
844 callback) { 848 callback) {
845 NOTREACHED() << "The IME warning bubble is unsupported on this platform."; 849 NOTREACHED() << "The IME warning bubble is unsupported on this platform.";
846 } 850 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698