summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/bookmark_bubble_controller.h
diff options
context:
space:
mode:
authordmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-18 01:49:45 +0000
committerdmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-18 01:49:45 +0000
commit230c35058d50b00f174aab1442d7f36892ebcd5f (patch)
tree44c6a1c03f77259205e3874734b8b39452943c69 /chrome/browser/cocoa/bookmark_bubble_controller.h
parent9caff42ae951d909e394565849a3c0b2ebc9ce3d (diff)
downloadchromium_src-230c35058d50b00f174aab1442d7f36892ebcd5f.zip
chromium_src-230c35058d50b00f174aab1442d7f36892ebcd5f.tar.gz
chromium_src-230c35058d50b00f174aab1442d7f36892ebcd5f.tar.bz2
Fix for parent window closing behind the bookmark bubble.
BUG=27752 TEST=none Review URL: http://codereview.chromium.org/397006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32251 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/bookmark_bubble_controller.h')
-rw-r--r--chrome/browser/cocoa/bookmark_bubble_controller.h27
1 files changed, 9 insertions, 18 deletions
diff --git a/chrome/browser/cocoa/bookmark_bubble_controller.h b/chrome/browser/cocoa/bookmark_bubble_controller.h
index c8bfd0b..fe89d08 100644
--- a/chrome/browser/cocoa/bookmark_bubble_controller.h
+++ b/chrome/browser/cocoa/bookmark_bubble_controller.h
@@ -10,24 +10,12 @@ class BookmarkModel;
class BookmarkNode;
@class BookmarkBubbleController;
-// Protocol for a BookmarkBubbleController's (BBC's) delegate.
-@protocol BookmarkBubbleControllerDelegate
-
-// The bubble asks the delegate to perform an edit when needed.
-- (void)editBookmarkNode:(const BookmarkNode*)node;
-
-// The bubble tells the delegate when it will go away.
-- (void)bubbleWindowWillClose:(NSWindow*)window;
-
-@end
-
// Controller for the bookmark bubble. The bookmark bubble is a
// bubble that pops up when clicking on the STAR next to the URL to
// add or remove it as a bookmark. This bubble allows for editing of
// the bookmark in various ways (name, folder, etc.)
@interface BookmarkBubbleController : NSWindowController<NSWindowDelegate> {
@private
- id<BookmarkBubbleControllerDelegate> delegate_; // weak like other delegates
NSWindow* parentWindow_; // weak
NSPoint topLeftForBubble_;
@@ -42,24 +30,27 @@ class BookmarkNode;
IBOutlet NSPopUpButton* folderPopUpButton_;
}
+@property (readonly, nonatomic) const BookmarkNode* node;
+
// |node| is the bookmark node we edit in this bubble.
// |alreadyBookmarked| tells us if the node was bookmarked before the
// user clicked on the star. (if NO, this is a brand new bookmark).
// The owner of this object is responsible for showing the bubble if
// it desires it to be visible on the screen. It is not shown by the
// init routine. Closing of the window happens implicitly on dealloc.
-- (id)initWithDelegate:(id<BookmarkBubbleControllerDelegate>)delegate
- parentWindow:(NSWindow*)parentWindow
- topLeftForBubble:(NSPoint)topLeftForBubble
- model:(BookmarkModel*)model
- node:(const BookmarkNode*)node
+- (id)initWithParentWindow:(NSWindow*)parentWindow
+ topLeftForBubble:(NSPoint)topLeftForBubble
+ model:(BookmarkModel*)model
+ node:(const BookmarkNode*)node
alreadyBookmarked:(BOOL)alreadyBookmarked;
// Actions for buttons in the dialog.
-- (IBAction)edit:(id)sender;
- (IBAction)ok:(id)sender;
- (IBAction)remove:(id)sender;
- (IBAction)cancel:(id)sender;
+
+// These actions send a -editBookmarkNode: action up the responder chain.
+- (IBAction)edit:(id)sender;
- (IBAction)folderChanged:(id)sender;
@end