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

Unified Diff: chrome/browser/cocoa/browser_window_controller.mm

Issue 391057: Fix multi-window bookmark bubble problem.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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
« no previous file with comments | « chrome/browser/cocoa/bookmark_bubble_controller_unittest.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/browser_window_controller.mm
===================================================================
--- chrome/browser/cocoa/browser_window_controller.mm (revision 32026)
+++ chrome/browser/cocoa/browser_window_controller.mm (working copy)
@@ -1172,27 +1172,17 @@
model:model
node:node
alreadyBookmarked:alreadyBookmarked];
- NSWindow* bookmarkBubbleWindow = [bookmarkBubbleController_ window];
- NSNotificationCenter* nc = [NSNotificationCenter defaultCenter];
- [nc addObserver:self
- selector:@selector(bubbleWindowWillClose:)
- name:NSWindowWillCloseNotification
- object:bookmarkBubbleWindow];
[bookmarkBubbleController_ showWindow:self];
}
}
-// Notification sent when our bubble window is closed.
-- (void)bubbleWindowWillClose:(NSNotification*)notification {
- DCHECK([[notification object] windowController] == bookmarkBubbleController_);
- NSNotificationCenter* nc = [NSNotificationCenter defaultCenter];
- [nc removeObserver:self
- name:NSWindowWillCloseNotification
- object:[bookmarkBubbleController_ window]];
- bookmarkBubbleController_ = nil;
+// Implement BookmarkBubbleControllerDelegate.
+- (void)bubbleWindowWillClose:(NSWindow*)window {
+ if (window == [bookmarkBubbleController_ window])
+ bookmarkBubbleController_ = nil;
}
-// Implement BookmarkBubbleControllerDelegate
+// Implement BookmarkBubbleControllerDelegate.
- (void)editBookmarkNode:(const BookmarkNode*)node {
// A BookmarkEditorController is a sheet that owns itself, and
// deallocates itself when closed.
« no previous file with comments | « chrome/browser/cocoa/bookmark_bubble_controller_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698