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 #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 "base/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
8 #include "ui/app_list/app_list_item_model.h" | 8 #include "ui/app_list/app_list_item_model.h" |
9 | 9 |
10 namespace app_list { | 10 namespace app_list { |
11 namespace test { | 11 namespace test { |
12 | 12 |
13 void AppListTestModel::PopulateApps(int n) { | 13 void AppListTestModel::PopulateApps(int n) { |
14 for (int i = 0; i < n; ++i) | 14 for (int i = 0; i < n; ++i) |
15 AddItem(base::StringPrintf("Item %d", i)); | 15 AddItem(base::StringPrintf("Item %d", i)); |
16 } | 16 } |
17 | 17 |
(...skipping 21 matching lines...) Expand all Loading... |
39 apps()->Add(CreateItem(title)); | 39 apps()->Add(CreateItem(title)); |
40 } | 40 } |
41 | 41 |
42 void AppListTestModel::HighlightItemAt(int index) { | 42 void AppListTestModel::HighlightItemAt(int index) { |
43 AppListItemModel* item = apps()->GetItemAt(index); | 43 AppListItemModel* item = apps()->GetItemAt(index); |
44 item->SetHighlighted(true); | 44 item->SetHighlighted(true); |
45 } | 45 } |
46 | 46 |
47 } // namespace test | 47 } // namespace test |
48 } // namespace app_list | 48 } // namespace app_list |
OLD | NEW |