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

Side by Side Diff: ui/app_list/test/app_list_test_model.cc

Issue 1539583003: Convert Pass()→std::move() in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/search_provider.cc ('k') | ui/aura/env.cc » ('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 "ui/app_list/test/app_list_test_model.h" 5 #include "ui/app_list/test/app_list_test_model.h"
6 6
7 #include <utility>
8
7 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
8 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
9 #include "third_party/skia/include/core/SkBitmap.h" 11 #include "third_party/skia/include/core/SkBitmap.h"
10 #include "ui/app_list/app_list_constants.h" 12 #include "ui/app_list/app_list_constants.h"
11 #include "ui/gfx/image/image_skia.h" 13 #include "ui/gfx/image/image_skia.h"
12 14
13 namespace app_list { 15 namespace app_list {
14 namespace test { 16 namespace test {
15 17
16 gfx::ImageSkia CreateImageSkia(int width, int height) { 18 gfx::ImageSkia CreateImageSkia(int width, int height) {
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 top_level_item_list()->item_at(nitems - 1)->position().CreateAfter(); 140 top_level_item_list()->item_at(nitems - 1)->position().CreateAfter();
139 } 141 }
140 item->SetPosition(position); 142 item->SetPosition(position);
141 SetItemName(item, id); 143 SetItemName(item, id);
142 return item; 144 return item;
143 } 145 }
144 146
145 AppListTestModel::AppListTestItem* AppListTestModel::CreateAndAddItem( 147 AppListTestModel::AppListTestItem* AppListTestModel::CreateAndAddItem(
146 const std::string& id) { 148 const std::string& id) {
147 scoped_ptr<AppListTestItem> test_item(CreateItem(id)); 149 scoped_ptr<AppListTestItem> test_item(CreateItem(id));
148 AppListItem* item = AppListModel::AddItem(test_item.Pass()); 150 AppListItem* item = AppListModel::AddItem(std::move(test_item));
149 return static_cast<AppListTestItem*>(item); 151 return static_cast<AppListTestItem*>(item);
150 } 152 }
151 void AppListTestModel::HighlightItemAt(int index) { 153 void AppListTestModel::HighlightItemAt(int index) {
152 AppListItem* item = top_level_item_list()->item_at(index); 154 AppListItem* item = top_level_item_list()->item_at(index);
153 top_level_item_list()->HighlightItemInstalledFromUI(item->id()); 155 top_level_item_list()->HighlightItemInstalledFromUI(item->id());
154 } 156 }
155 157
156 void AppListTestModel::ItemActivated(AppListTestItem* item) { 158 void AppListTestModel::ItemActivated(AppListTestItem* item) {
157 last_activated_ = item; 159 last_activated_ = item;
158 ++activate_count_; 160 ++activate_count_;
159 } 161 }
160 162
161 } // namespace test 163 } // namespace test
162 } // namespace app_list 164 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/search_provider.cc ('k') | ui/aura/env.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698