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

Unified Diff: chrome/browser/ui/cocoa/browser_window_cocoa.mm

Issue 7734003: Implement basic theming for panel titlebars. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 4 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/cocoa/browser_window_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.mm b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
index ea410b2b18f772e210d4801da8c6041442090105..c44fef2a2dd0e8bb8b9f20a26889ecf2551fefae 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
@@ -202,24 +202,10 @@ void BrowserWindowCocoa::UpdateTitleBar() {
NSString* newTitle =
base::SysUTF16ToNSString(browser_->GetWindowTitleForCurrentTab());
- // Work around Cocoa bug: if a window changes title during the tracking of the
- // Window menu it doesn't display well and the constant re-sorting of the list
- // makes it difficult for the user to pick the desired window. Delay window
- // title updates until the default run-loop mode.
-
- if (pending_window_title_.get())
- [[NSRunLoop currentRunLoop]
- cancelPerformSelector:@selector(setTitle:)
- target:window()
- argument:pending_window_title_.get()];
-
- pending_window_title_.reset([newTitle copy]);
- [[NSRunLoop currentRunLoop]
- performSelector:@selector(setTitle:)
- target:window()
- argument:newTitle
- order:0
- modes:[NSArray arrayWithObject:NSDefaultRunLoopMode]];
+ pending_window_title_.reset(
+ [BrowserWindowUtils scheduleReplaceOldTitle:pending_window_title_.get()
+ withNewTitle:newTitle
+ forWindow:window()]);
}
void BrowserWindowCocoa::BookmarkBarStateChanged(

Powered by Google App Engine
This is Rietveld 408576698