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

Side by Side Diff: ui/app_list/cocoa/apps_grid_controller_unittest.mm

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
« no previous file with comments | « ui/app_list/cocoa/apps_grid_controller.h ('k') | ui/app_list/cocoa/apps_grid_view_item.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/mac/foundation_util.h" 7 #include "base/mac/foundation_util.h"
8 #include "base/mac/scoped_nsobject.h" 8 #include "base/mac/scoped_nsobject.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 [owned_apps_grid_controller_ setDelegate:NULL]; 122 [owned_apps_grid_controller_ setDelegate:NULL];
123 123
124 owned_delegate_->ReplaceTestModel(item_count); 124 owned_delegate_->ReplaceTestModel(item_count);
125 [owned_apps_grid_controller_ setDelegate:owned_delegate_.get()]; 125 [owned_apps_grid_controller_ setDelegate:owned_delegate_.get()];
126 } 126 }
127 127
128 AppListTestModel* model() { return owned_delegate_->GetTestModel(); } 128 AppListTestModel* model() { return owned_delegate_->GetTestModel(); }
129 129
130 private: 130 private:
131 base::scoped_nsobject<AppsGridController> owned_apps_grid_controller_; 131 base::scoped_nsobject<AppsGridController> owned_apps_grid_controller_;
132 scoped_ptr<AppListTestViewDelegate> owned_delegate_; 132 std::unique_ptr<AppListTestViewDelegate> owned_delegate_;
133 133
134 DISALLOW_COPY_AND_ASSIGN(AppsGridControllerTest); 134 DISALLOW_COPY_AND_ASSIGN(AppsGridControllerTest);
135 }; 135 };
136 136
137 class AppListItemWithMenu : public AppListItem { 137 class AppListItemWithMenu : public AppListItem {
138 public: 138 public:
139 explicit AppListItemWithMenu(const std::string& id) 139 explicit AppListItemWithMenu(const std::string& id)
140 : AppListItem(id), 140 : AppListItem(id),
141 menu_model_(NULL), 141 menu_model_(NULL),
142 menu_ready_(true) { 142 menu_ready_(true) {
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 // Test that a button being held down with the left button does not also show 970 // Test that a button being held down with the left button does not also show
971 // a context menu. 971 // a context menu.
972 [GetItemViewAt(0) highlight:YES]; 972 [GetItemViewAt(0) highlight:YES];
973 EXPECT_FALSE([page menuForEvent:mouse_at_cell_0]); 973 EXPECT_FALSE([page menuForEvent:mouse_at_cell_0]);
974 [GetItemViewAt(0) highlight:NO]; 974 [GetItemViewAt(0) highlight:NO];
975 EXPECT_TRUE([page menuForEvent:mouse_at_cell_0]); 975 EXPECT_TRUE([page menuForEvent:mouse_at_cell_0]);
976 } 976 }
977 977
978 } // namespace test 978 } // namespace test
979 } // namespace app_list 979 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/cocoa/apps_grid_controller.h ('k') | ui/app_list/cocoa/apps_grid_view_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698