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

Side by Side Diff: chrome/browser/cocoa/draggable_button.h

Issue 180036: Make download items drag sources on OS X. (Closed)
Patch Set: comments Created 10 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #import <Cocoa/Cocoa.h>
6
7 // Class for buttons that can be drag sources. If the mouse is clicked and moved
8 // more than a given distance, this class will call |-beginDrag:| instead of
9 // |-performClick:|. Subclasses should override these two methods.
10 @interface DraggableButton : NSButton {
11 @private
12 BOOL draggable_; // Is this a draggable type of button?
13 BOOL mayDragStart_; // Set to YES on mouse down, NO on up or drag.
14 BOOL beingDragged_;
15
16 // Initial mouse-down to prevent a hair-trigger drag.
17 NSPoint initialMouseDownLocation_;
18 }
19
20 // Enable or disable dragability for special buttons like "Other Bookmarks".
21 @property BOOL draggable;
22
23 // Called when a drag starts. Subclasses must override this.
24 - (void)beginDrag:(NSEvent*)dragEvent;
25
26 // Subclasses should call this method to notify DraggableButton when a drag is
27 // over.
28 - (void)endDrag;
29
30 @end // @interface DraggableButton
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/download_item_controller.mm ('k') | chrome/browser/cocoa/draggable_button.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698