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

Unified Diff: chrome/browser/cocoa/extensions/browser_action_button.h

Issue 1418003: [Mac] Enables drag N' drop for the buttons within the Browser Actions contain... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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
« no previous file with comments | « chrome/app/nibs/Toolbar.xib ('k') | chrome/browser/cocoa/extensions/browser_action_button.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/extensions/browser_action_button.h
===================================================================
--- chrome/browser/cocoa/extensions/browser_action_button.h (revision 42818)
+++ chrome/browser/cocoa/extensions/browser_action_button.h (working copy)
@@ -20,6 +20,11 @@
// be updated.
extern const NSString* kBrowserActionButtonUpdatedNotification;
+// Fired on each drag event while the user is moving the button.
+extern const NSString* kBrowserActionButtonDraggingNotification;
+// Fired when the user drops the button.
+extern const NSString* kBrowserActionButtonDragEndNotification;
+
extern const CGFloat kBrowserActionWidth;
@interface BrowserActionButton : NSButton {
@@ -34,33 +39,44 @@
// The icon specific to the active tab.
scoped_nsobject<NSImage> tabSpecificIcon_;
+ // Used to move the button and query whether a button is currently animating.
+ scoped_nsobject<NSAnimation> moveAnimation_;
+
// The extension for this button. Weak.
Extension* extension_;
// The ID of the active tab.
int tabId_;
+
+ // Whether the button is currently being dragged.
+ BOOL isBeingDragged_;
}
- (id)initWithExtension:(Extension*)extension
profile:(Profile*)profile
tabId:(int)tabId;
+- (void)setFrame:(NSRect)frameRect animate:(BOOL)animate;
+
- (void)setDefaultIcon:(NSImage*)image;
- (void)setTabSpecificIcon:(NSImage*)image;
- (void)updateState;
+- (BOOL)isAnimating;
+
// Returns a pointer to an autoreleased NSImage with the badge, shadow and
// cell image drawn into it.
- (NSImage*)compositedImage;
+@property(readonly, nonatomic) BOOL isBeingDragged;
+@property(readonly, nonatomic) Extension* extension;
@property(readwrite, nonatomic) int tabId;
-@property(readonly, nonatomic) Extension* extension;
@end
-@interface BrowserActionCell : ToolbarButtonCell {
+@interface BrowserActionCell : GradientButtonCell {
@private
// The current tab ID used when drawing the cell.
int tabId_;
« no previous file with comments | « chrome/app/nibs/Toolbar.xib ('k') | chrome/browser/cocoa/extensions/browser_action_button.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698