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( |