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

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

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 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
OLDNEW
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_GRID_CONTROLLER_H_ 5 #ifndef UI_APP_LIST_COCOA_APPS_GRID_CONTROLLER_H_
6 #define UI_APP_LIST_COCOA_APPS_GRID_CONTROLLER_H_ 6 #define UI_APP_LIST_COCOA_APPS_GRID_CONTROLLER_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 10
11 #include <memory>
12
11 #include "base/mac/scoped_nsobject.h" 13 #include "base/mac/scoped_nsobject.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "ui/app_list/app_list_export.h" 14 #include "ui/app_list/app_list_export.h"
14 #import "ui/app_list/cocoa/app_list_pager_view.h" 15 #import "ui/app_list/cocoa/app_list_pager_view.h"
15 #import "ui/app_list/cocoa/scroll_view_with_no_scrollbars.h" 16 #import "ui/app_list/cocoa/scroll_view_with_no_scrollbars.h"
16 17
17 namespace app_list { 18 namespace app_list {
18 class AppListModel; 19 class AppListModel;
19 class AppListViewDelegate; 20 class AppListViewDelegate;
20 class AppsGridDelegateBridge; 21 class AppsGridDelegateBridge;
21 } 22 }
22 23
23 @class AppsGridViewItem; 24 @class AppsGridViewItem;
24 @protocol AppsPaginationModelObserver; 25 @protocol AppsPaginationModelObserver;
25 @class AppsCollectionViewDragManager; 26 @class AppsCollectionViewDragManager;
26 27
27 // Controls a grid of views, representing AppListItemList sub models. 28 // Controls a grid of views, representing AppListItemList sub models.
28 APP_LIST_EXPORT 29 APP_LIST_EXPORT
29 @interface AppsGridController : NSViewController<GestureScrollDelegate, 30 @interface AppsGridController : NSViewController<GestureScrollDelegate,
30 AppListPagerDelegate, 31 AppListPagerDelegate,
31 NSCollectionViewDelegate> { 32 NSCollectionViewDelegate> {
32 @private 33 @private
33 app_list::AppListViewDelegate* delegate_; // Weak. Owned by view controller. 34 app_list::AppListViewDelegate* delegate_; // Weak. Owned by view controller.
34 scoped_ptr<app_list::AppsGridDelegateBridge> bridge_; 35 std::unique_ptr<app_list::AppsGridDelegateBridge> bridge_;
35 36
36 base::scoped_nsobject<AppsCollectionViewDragManager> dragManager_; 37 base::scoped_nsobject<AppsCollectionViewDragManager> dragManager_;
37 base::scoped_nsobject<NSMutableArray> pages_; 38 base::scoped_nsobject<NSMutableArray> pages_;
38 base::scoped_nsobject<NSMutableArray> items_; 39 base::scoped_nsobject<NSMutableArray> items_;
39 base::scoped_nsobject<NSTimer> scrollWhileDraggingTimer_; 40 base::scoped_nsobject<NSTimer> scrollWhileDraggingTimer_;
40 41
41 id<AppsPaginationModelObserver> paginationObserver_; 42 id<AppsPaginationModelObserver> paginationObserver_;
42 43
43 // Index of the currently visible page. 44 // Index of the currently visible page.
44 size_t visiblePage_; 45 size_t visiblePage_;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 @end 118 @end
118 119
119 @interface AppsGridController(TestingAPI) 120 @interface AppsGridController(TestingAPI)
120 121
121 - (AppsCollectionViewDragManager*)dragManager; 122 - (AppsCollectionViewDragManager*)dragManager;
122 - (size_t)scheduledScrollPage; 123 - (size_t)scheduledScrollPage;
123 124
124 @end 125 @end
125 126
126 #endif // UI_APP_LIST_COCOA_APPS_GRID_CONTROLLER_H_ 127 #endif // UI_APP_LIST_COCOA_APPS_GRID_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ui/app_list/cocoa/app_list_window_controller_unittest.mm ('k') | ui/app_list/cocoa/apps_grid_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698