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

Unified Diff: chrome/browser/cocoa/bookmark_bubble_controller.h

Issue 333017: Fixes up bookmark bubbles and the browser window so that they shut down corre... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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/cocoa/bookmark_bubble_controller.h
===================================================================
--- chrome/browser/cocoa/bookmark_bubble_controller.h (revision 29973)
+++ chrome/browser/cocoa/bookmark_bubble_controller.h (working copy)
@@ -16,36 +16,21 @@
// The bubble asks the delegate to perform an edit when needed.
- (void)editBookmarkNode:(const BookmarkNode*)node;
-// The bubble tells its delegate when it's done and can be deallocated.
-- (void)doneWithBubbleController:(BookmarkBubbleController*)controller;
-
@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.)
-//
-// The bubble is stored in a nib as a view, not as a window, so we can
-// make it an actual bubble. There is no nib-rific way to encode a
-// NSBorderlessWindowMask NSWindow, and the style of an NSWindow can't
-// be set other than init time. To deal, we create the NSWindow
-// programatically, but encode the view in a nib. Thus,
-// BookmarkBubbleController is an NSViewController, not an
-// NSWindowController.
-@interface BookmarkBubbleController : NSViewController<NSWindowDelegate> {
+@interface BookmarkBubbleController : NSWindowController<NSWindowDelegate> {
@private
- // Unexpected for this controller, perhaps, but our window does NOT
- // come from a nib.
- scoped_nsobject<NSWindow> window_;
-
id<BookmarkBubbleControllerDelegate> delegate_; // weak like other delegates
NSWindow* parentWindow_; // weak
- NSPoint topLeftForBubble_;
+ NSPoint topLeftForBubble_; // weak
Scott Hess - ex-Googler 2009/10/26 19:45:21 Probably don't need weak on NSPoint.
// Both weak; owned by the current browser's profile
- BookmarkModel* model_;
- const BookmarkNode* node_;
+ BookmarkModel* model_; // weak
+ const BookmarkNode* node_; // weak
// A mapping from titles to nodes so we only have to walk this once.
scoped_nsobject<NSMutableArray> titleMapping_;
@@ -71,29 +56,26 @@
node:(const BookmarkNode*)node
alreadyBookmarked:(BOOL)alreadyBookmarked;
-- (void)showWindow;
-
// Actions for buttons in the dialog.
- (IBAction)edit:(id)sender;
-- (IBAction)close:(id)sender;
+- (IBAction)ok:(id)sender;
- (IBAction)remove:(id)sender;
+- (IBAction)cancel:(id)sender;
@end
// Exposed only for unit testing.
@interface BookmarkBubbleController(ExposedForUnitTesting)
-- (NSWindow*)createBubbleWindow;
- (void)fillInFolderList;
-- (BOOL)windowHasBeenClosed;
- (void)addFolderNodes:(const BookmarkNode*)parent toComboBox:(NSComboBox*)box;
- (void)updateBookmarkNode;
-- (void)setTitle:(NSString *)title parentFolder:(NSString*)folder;
+- (void)setTitle:(NSString*)title parentFolder:(NSString*)folder;
- (NSString*)chooseAnotherFolderString;
+- (NSComboBox*)folderComboBox;
@end
-// Also private but I need to declare them specially for @synthesize to work.
-@interface BookmarkBubbleController ()
-@property (readonly) id delegate;
-@property (readonly) NSComboBox* folderComboBox;
-@end
+
+
+
+

Powered by Google App Engine
This is Rietveld 408576698