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

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 9ad67b9fb8c781684f130528a948488e5681b892..97202d55f641b782751b5c9e86e71cf38cdfaf79 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
@@ -203,24 +203,9 @@ 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]];
+ [BrowserWindowUtils delayedReplace:pending_window_title_.get()
Dmitry Titov 2011/08/31 01:01:30 Naming suggestion: Usually 'delayedFoo' is associa
dcheng 2011/08/31 23:58:03 Done. Now with a longer more verbose name.
+ with:newTitle
+ on:window()];
}
void BrowserWindowCocoa::BookmarkBarStateChanged(

Powered by Google App Engine
This is Rietveld 408576698