OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_APP_LIST_COCOA_APPS_COLLECTION_VIEW_DRAG_MANAGER_H_ | 5 #ifndef UI_APP_LIST_COCOA_APPS_COLLECTION_VIEW_DRAG_MANAGER_H_ |
6 #define UI_APP_LIST_COCOA_APPS_COLLECTION_VIEW_DRAG_MANAGER_H_ | 6 #define UI_APP_LIST_COCOA_APPS_COLLECTION_VIEW_DRAG_MANAGER_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/memory/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
11 #include "ui/app_list/app_list_export.h" | 11 #include "ui/app_list/app_list_export.h" |
12 | 12 |
13 @class AppsGridController; | 13 @class AppsGridController; |
14 @class ItemDragController; | 14 @class ItemDragController; |
15 | 15 |
16 // Manager for the state associated with dragging an NSCollectionViewItem in the | 16 // Manager for the state associated with dragging an NSCollectionViewItem in the |
17 // AppsGridController. It is also a factory for the NSCollectionView pages in | 17 // AppsGridController. It is also a factory for the NSCollectionView pages in |
18 // the grid, allowing items to be dragged between pages. | 18 // the grid, allowing items to be dragged between pages. |
19 APP_LIST_EXPORT | 19 APP_LIST_EXPORT |
20 @interface AppsCollectionViewDragManager : NSObject { | 20 @interface AppsCollectionViewDragManager : NSObject { |
21 @private | 21 @private |
22 scoped_nsobject<ItemDragController> itemDragController_; | 22 base::scoped_nsobject<ItemDragController> itemDragController_; |
23 AppsGridController* gridController_; // Weak. Owns us. | 23 AppsGridController* gridController_; // Weak. Owns us. |
24 | 24 |
25 NSSize cellSize_; | 25 NSSize cellSize_; |
26 size_t rows_; | 26 size_t rows_; |
27 size_t columns_; | 27 size_t columns_; |
28 | 28 |
29 // Index of the last known position of the item currently being dragged. | 29 // Index of the last known position of the item currently being dragged. |
30 size_t itemDragIndex_; | 30 size_t itemDragIndex_; |
31 | 31 |
32 // Model index of the item being dragged, or NSNotFound if nothing was hit on | 32 // Model index of the item being dragged, or NSNotFound if nothing was hit on |
(...skipping 22 matching lines...) Expand all Loading... |
55 @interface AppsCollectionViewDragManager (TestingAPI) | 55 @interface AppsCollectionViewDragManager (TestingAPI) |
56 | 56 |
57 - (void)onMouseDownInPage:(NSCollectionView*)page | 57 - (void)onMouseDownInPage:(NSCollectionView*)page |
58 withEvent:(NSEvent*)theEvent; | 58 withEvent:(NSEvent*)theEvent; |
59 - (void)onMouseDragged:(NSEvent*)theEvent; | 59 - (void)onMouseDragged:(NSEvent*)theEvent; |
60 - (void)onMouseUp:(NSEvent*)theEvent; | 60 - (void)onMouseUp:(NSEvent*)theEvent; |
61 | 61 |
62 @end | 62 @end |
63 | 63 |
64 #endif // UI_APP_LIST_COCOA_APPS_COLLECTION_VIEW_DRAG_MANAGER_H_ | 64 #endif // UI_APP_LIST_COCOA_APPS_COLLECTION_VIEW_DRAG_MANAGER_H_ |
OLD | NEW |