| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" | 8 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" |
| 9 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_model_observer_for_cocoa.h" | 9 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_model_observer_for_cocoa.h" |
| 10 | 10 |
| 11 class BookmarkModel; | 11 class BookmarkModel; |
| 12 class BookmarkNode; | 12 class BookmarkNode; |
| 13 @class BookmarkBubbleController; | 13 @class BookmarkBubbleController; |
| 14 | 14 |
| 15 // Controller for the bookmark bubble. The bookmark bubble is a | 15 // Controller for the bookmark bubble. The bookmark bubble is a |
| 16 // bubble that pops up when clicking on the STAR next to the URL to | 16 // bubble that pops up when clicking on the STAR next to the URL to |
| 17 // add or remove it as a bookmark. This bubble allows for editing of | 17 // add or remove it as a bookmark. This bubble allows for editing of |
| 18 // the bookmark in various ways (name, folder, etc.) | 18 // the bookmark in various ways (name, folder, etc.) |
| 19 @interface BookmarkBubbleController : BaseBubbleController { | 19 @interface BookmarkBubbleController : BaseBubbleController { |
| 20 @private | 20 @private |
| 21 // Both weak; owned by the current browser's profile | 21 // Both weak; owned by the current browser's profile. |
| 22 BookmarkModel* model_; // weak | 22 BookmarkModel* model_; // weak |
| 23 const BookmarkNode* node_; // weak | 23 const BookmarkNode* node_; // weak |
| 24 | 24 |
| 25 // The bookmark node whose button we asked to pulse. | 25 // The bookmark node whose button we asked to pulse. |
| 26 const BookmarkNode* pulsingBookmarkNode_; // weak | 26 const BookmarkNode* pulsingBookmarkNode_; // weak |
| 27 | 27 |
| 28 BOOL alreadyBookmarked_; | 28 BOOL alreadyBookmarked_; |
| 29 | 29 |
| 30 // Ping me when the bookmark model changes out from under us. | 30 // Ping me when the bookmark model changes out from under us. |
| 31 scoped_ptr<BookmarkModelObserverForCocoa> bookmark_observer_; | 31 scoped_ptr<BookmarkModelObserverForCocoa> bookmarkObserver_; |
| 32 | 32 |
| 33 IBOutlet NSTextField* bigTitle_; // "Bookmark" or "Bookmark Added!" | 33 IBOutlet NSTextField* bigTitle_; // "Bookmark" or "Bookmark Added!" |
| 34 IBOutlet NSTextField* nameTextField_; | 34 IBOutlet NSTextField* nameTextField_; |
| 35 IBOutlet NSPopUpButton* folderPopUpButton_; | 35 IBOutlet NSPopUpButton* folderPopUpButton_; |
| 36 } | 36 } |
| 37 | 37 |
| 38 @property(readonly, nonatomic) const BookmarkNode* node; | 38 @property(readonly, nonatomic) const BookmarkNode* node; |
| 39 | 39 |
| 40 // |node| is the bookmark node we edit in this bubble. | 40 // |node| is the bookmark node we edit in this bubble. |
| 41 // |alreadyBookmarked| tells us if the node was bookmarked before the | 41 // |alreadyBookmarked| tells us if the node was bookmarked before the |
| (...skipping 21 matching lines...) Expand all Loading... |
| 63 // Exposed only for unit testing. | 63 // Exposed only for unit testing. |
| 64 @interface BookmarkBubbleController (ExposedForUnitTesting) | 64 @interface BookmarkBubbleController (ExposedForUnitTesting) |
| 65 - (void)addFolderNodes:(const BookmarkNode*)parent | 65 - (void)addFolderNodes:(const BookmarkNode*)parent |
| 66 toPopUpButton:(NSPopUpButton*)button | 66 toPopUpButton:(NSPopUpButton*)button |
| 67 indentation:(int)indentation; | 67 indentation:(int)indentation; |
| 68 - (void)setTitle:(NSString*)title parentFolder:(const BookmarkNode*)parent; | 68 - (void)setTitle:(NSString*)title parentFolder:(const BookmarkNode*)parent; |
| 69 - (void)setParentFolderSelection:(const BookmarkNode*)parent; | 69 - (void)setParentFolderSelection:(const BookmarkNode*)parent; |
| 70 + (NSString*)chooseAnotherFolderString; | 70 + (NSString*)chooseAnotherFolderString; |
| 71 - (NSPopUpButton*)folderPopUpButton; | 71 - (NSPopUpButton*)folderPopUpButton; |
| 72 @end | 72 @end |
| OLD | NEW |