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

Unified Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_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_bar_controller.h
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h
index 88ee2858380779f32c1dd752cdb08d515a87c01a..d72d7c98ad91bb5f9a85d2ead412e8578310b4ba 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h
@@ -24,8 +24,9 @@
@class BookmarkBarFolderController;
@class BookmarkBarView;
@class BookmarkButtonCell;
-@class BookmarkFolderTarget;
@class BookmarkContextMenuCocoaController;
+@class BookmarkFolderTarget;
+class BookmarkModelObserverForCocoa;
class Browser;
class GURL;
namespace ui {
@@ -286,6 +287,15 @@ willAnimateFromState:(BookmarkBar::State)oldState
// Controller responsible for all bookmark context menus.
base::scoped_nsobject<BookmarkContextMenuCocoaController>
contextMenuController_;
+
+ // Weak pointer to the pulsed button for the currently pulsing node. We need
+ // to store this as it may not be possible to determine the pulsing button if
+ // the pulsing node is deleted. Nil if there is no pulsing node.
+ BookmarkButton* pulsingButton_;
+
+ // Specifically watch the currently pulsing node. This lets us stop pulsing
+ // when anything happens to the node. Null if there is no pulsing node.
+ scoped_ptr<BookmarkModelObserverForCocoa> pulsingBookmarkObserver_;
}
@property(readonly, nonatomic) BookmarkBar::State currentState;
@@ -308,6 +318,12 @@ willAnimateFromState:(BookmarkBar::State)oldState
// The controller for all bookmark bar context menus.
- (BookmarkContextMenuCocoaController*)menuController;
+// Pulses the given bookmark node, or the closest parent node that is visible.
+- (void)startPulsingBookmarkNode:(const bookmarks::BookmarkNode*)node;
+
+// Stops pulsing any bookmark nodes.
+- (void)stopPulsingBookmarkNode;
+
// Updates the bookmark bar (from its current, possibly in-transition) state to
// the new state.
- (void)updateState:(BookmarkBar::State)newState
« no previous file with comments | « chrome/browser/ui/bookmarks/bookmark_bubble_observer.h ('k') | chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698