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

Side by Side Diff: ui/app_list/cocoa/apps_search_results_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_SEARCH_RESULTS_CONTROLLER_H_ 5 #ifndef UI_APP_LIST_COCOA_APPS_SEARCH_RESULTS_CONTROLLER_H_
6 #define UI_APP_LIST_COCOA_APPS_SEARCH_RESULTS_CONTROLLER_H_ 6 #define UI_APP_LIST_COCOA_APPS_SEARCH_RESULTS_CONTROLLER_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include <memory>
11
10 #include "base/mac/scoped_nsobject.h" 12 #include "base/mac/scoped_nsobject.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "ui/app_list/app_list_export.h" 13 #include "ui/app_list/app_list_export.h"
13 #include "ui/app_list/app_list_model.h" 14 #include "ui/app_list/app_list_model.h"
14 #import "ui/base/cocoa/tracking_area.h" 15 #import "ui/base/cocoa/tracking_area.h"
15 16
16 namespace app_list { 17 namespace app_list {
17 class AppsSearchResultsModelBridge; 18 class AppsSearchResultsModelBridge;
18 class SearchResult; 19 class SearchResult;
19 } 20 }
20 21
21 @class AppsSearchResultsCell; 22 @class AppsSearchResultsCell;
(...skipping 10 matching lines...) Expand all
32 // has an icon on the left, and one or two lines of formatted text describing 33 // has an icon on the left, and one or two lines of formatted text describing
33 // the result. 34 // the result.
34 APP_LIST_EXPORT 35 APP_LIST_EXPORT
35 @interface AppsSearchResultsController 36 @interface AppsSearchResultsController
36 : NSViewController<NSTableViewDelegate, NSTableViewDataSource> { 37 : NSViewController<NSTableViewDelegate, NSTableViewDataSource> {
37 @private 38 @private
38 base::scoped_nsobject<NSTableView> tableView_; 39 base::scoped_nsobject<NSTableView> tableView_;
39 ui::ScopedCrTrackingArea trackingArea_; 40 ui::ScopedCrTrackingArea trackingArea_;
40 NSPoint lastMouseDownInView_; 41 NSPoint lastMouseDownInView_;
41 NSInteger hoveredRowIndex_; 42 NSInteger hoveredRowIndex_;
42 scoped_ptr<app_list::AppsSearchResultsModelBridge> bridge_; 43 std::unique_ptr<app_list::AppsSearchResultsModelBridge> bridge_;
43 NSObject<AppsSearchResultsDelegate>* delegate_; // Weak. Owns us. 44 NSObject<AppsSearchResultsDelegate>* delegate_; // Weak. Owns us.
44 } 45 }
45 46
46 @property(assign, nonatomic) NSObject<AppsSearchResultsDelegate>* delegate; 47 @property(assign, nonatomic) NSObject<AppsSearchResultsDelegate>* delegate;
47 @property(readonly, nonatomic) app_list::AppListModel::SearchResults* results; 48 @property(readonly, nonatomic) app_list::AppListModel::SearchResults* results;
48 @property(readonly, nonatomic) NSTableView* tableView; 49 @property(readonly, nonatomic) NSTableView* tableView;
49 50
50 - (id)initWithAppsSearchResultsFrameSize:(NSSize)size; 51 - (id)initWithAppsSearchResultsFrameSize:(NSSize)size;
51 52
52 // Returns true when handling Enter, to activate the highlighted search result, 53 // Returns true when handling Enter, to activate the highlighted search result,
53 // or up/down to navigate results. 54 // or up/down to navigate results.
54 - (BOOL)handleCommandBySelector:(SEL)command; 55 - (BOOL)handleCommandBySelector:(SEL)command;
55 56
56 @end 57 @end
57 58
58 #endif // UI_APP_LIST_COCOA_APPS_SEARCH_RESULTS_CONTROLLER_H_ 59 #endif // UI_APP_LIST_COCOA_APPS_SEARCH_RESULTS_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ui/app_list/cocoa/apps_search_box_controller.h ('k') | ui/app_list/cocoa/apps_search_results_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698