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

Side by Side Diff: ui/app_list/cocoa/item_drag_controller.h

Issue 187483005: Extending the Views-on-Mac experiment: whole app list grid. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: still compiles r263560 + crrev/195793005 Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « ui/app_list/cocoa/apps_grid_view_item.mm ('k') | ui/app_list/cocoa/item_drag_controller.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 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 #ifndef UI_APP_LIST_COCOA_ITEM_DRAG_CONTROLLER_H_
6 #define UI_APP_LIST_COCOA_ITEM_DRAG_CONTROLLER_H_
7
8 #import <Cocoa/Cocoa.h>
9 #import <QuartzCore/QuartzCore.h>
10
11 #include "base/mac/scoped_nsobject.h"
12
13 @class AppsGridViewItem;
14
15 // Controller to manage the animations and transient views that are used when
16 // dragging an app list item around the app list grid. When initiated, the item
17 // image (only) is grown in an animation, and sticks to the mouse cursor. When
18 // released, the label is added to the image and it shrinks and moves to the
19 // item location in the grid.
20 @interface ItemDragController : NSViewController {
21 @private
22 base::scoped_nsobject<CALayer> dragLayer_;
23 base::scoped_nsobject<NSButton> buttonToRestore_;
24 NSPoint mouseOffset_;
25 NSTimeInterval growStart_;
26 BOOL shrinking_;
27 }
28
29 - (id)initWithGridCellSize:(NSSize)size;
30
31 - (void)initiate:(AppsGridViewItem*)item
32 mouseDownLocation:(NSPoint)mouseDownLocation
33 currentLocation:(NSPoint)currentLocation
34 timestamp:(NSTimeInterval)eventTimestamp;
35
36 - (void)update:(NSPoint)currentLocation
37 timestamp:(NSTimeInterval)eventTimestamp;
38
39 - (void)complete:(AppsGridViewItem*)item
40 targetOrigin:(NSPoint)targetOrigin;
41
42 @end
43
44 #endif // UI_APP_LIST_COCOA_ITEM_DRAG_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ui/app_list/cocoa/apps_grid_view_item.mm ('k') | ui/app_list/cocoa/item_drag_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698