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

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

Issue 1308293002: [Mac] Refactor bookmark pulsing into BookmarkBubbleObserverCocoa. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bookmarkeditor
Patch Set: Address comments. Update unit_tests. Created 5 years, 4 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/ui/cocoa/bookmarks/bookmark_bubble_controller.h
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h
index 1650def8af51cc2f067caa7072dd1dc3709ff31b..9da88dfe102fc2946ec5d6eba23a95929993ca74 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h
@@ -13,6 +13,7 @@
@class BookmarkSyncPromoController;
namespace bookmarks {
+class BookmarkBubbleObserver;
class BookmarkModel;
class BookmarkNode;
class ManagedBookmarkService;
@@ -30,8 +31,8 @@ class ManagedBookmarkService;
bookmarks::BookmarkModel* model_; // weak
const bookmarks::BookmarkNode* node_; // weak
- // The bookmark node whose button we asked to pulse.
- const bookmarks::BookmarkNode* pulsingBookmarkNode_; // weak
+ // Inform the observer when the bubble is shown or closed.
+ bookmarks::BookmarkBubbleObserver* bookmarkBubbleObserver_; // weak
BOOL alreadyBookmarked_;
@@ -56,6 +57,7 @@ class ManagedBookmarkService;
// 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)initWithParentWindow:(NSWindow*)parentWindow
+ bubbleObserver:(bookmarks::BookmarkBubbleObserver*)bubbleObserver
managed:(bookmarks::ManagedBookmarkService*)managed
model:(bookmarks::BookmarkModel*)model
node:(const bookmarks::BookmarkNode*)node
@@ -77,6 +79,8 @@ class ManagedBookmarkService;
@interface BookmarkBubbleController (ExposedForUnitTesting)
@property(nonatomic, readonly) NSView* syncPromoPlaceholder;
+@property(nonatomic, readonly)
+ bookmarks::BookmarkBubbleObserver* bookmarkBubbleObserver;
- (void)addFolderNodes:(const bookmarks::BookmarkNode*)parent
toPopUpButton:(NSPopUpButton*)button

Powered by Google App Engine
This is Rietveld 408576698