diff options
author | feldstein@chromium.org <feldstein@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-16 22:01:25 +0000 |
---|---|---|
committer | feldstein@chromium.org <feldstein@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-16 22:01:25 +0000 |
commit | 9038098882dc2e0c8963132de61df26ac4253811 (patch) | |
tree | e34f4136d5a99cdda340035bb4571285ab5be9a4 /chrome/browser/cocoa/draggable_button.h | |
parent | 1239af15394f84827718c0c1327afd85c6bd1c22 (diff) | |
download | chromium_src-9038098882dc2e0c8963132de61df26ac4253811.zip chromium_src-9038098882dc2e0c8963132de61df26ac4253811.tar.gz chromium_src-9038098882dc2e0c8963132de61df26ac4253811.tar.bz2 |
Fix stuck highlight state when dragging other bookmarks folder, or when dragging something from the download shelf.
DraggingButton.mm was setting up non-draggable buttons to be ready for drag.
DownloadShelfButtons never called endDrag.
BUG=40594
TEST=Try to drag the Other Bookmarks button. It shouldn't stay highlighted.
Review URL: http://codereview.chromium.org/1648003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44830 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/draggable_button.h')
-rw-r--r-- | chrome/browser/cocoa/draggable_button.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/chrome/browser/cocoa/draggable_button.h b/chrome/browser/cocoa/draggable_button.h index ed9a94f..eee719a 100644 --- a/chrome/browser/cocoa/draggable_button.h +++ b/chrome/browser/cocoa/draggable_button.h @@ -10,21 +10,24 @@ @interface DraggableButton : NSButton { @private BOOL draggable_; // Is this a draggable type of button? - BOOL mayDragStart_; // Set to YES on mouse down, NO on up or drag. - BOOL beingDragged_; - - // Initial mouse-down to prevent a hair-trigger drag. - NSPoint initialMouseDownLocation_; } // Enable or disable dragability for special buttons like "Other Bookmarks". @property BOOL draggable; -// Called when a drag starts. Subclasses must override this. +// Called when a drag should start. Subclasses must override this to do any +// pasteboard manipulation and begin the drag, usually with +// -dragImage:at:offset:event:. Subclasses must call one of the blocking +// -drag* methods of NSView when overriding this method. - (void)beginDrag:(NSEvent*)dragEvent; -// Subclasses should call this method to notify DraggableButton when a drag is -// over. +@end // @interface DraggableButton + +@interface DraggableButton (Private) + +// Resets the draggable state of the button after dragging is finished. This is +// called by DraggableButton when the beginDrag call returns, it should not be +// called by the subclass. - (void)endDrag; -@end // @interface DraggableButton +@end // @interface DraggableButton(Private) |