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