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

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

Issue 960203004: tracing for RenderTextMac::GetDisplayText() eliding goo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20150129-MacViews-Bringup5-RTHB-in-Label
Patch Set: fix upstream Created 5 years, 9 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 | « no previous file | ui/gfx/render_text.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 "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "third_party/skia/include/core/SkBitmap.h" 9 #include "third_party/skia/include/core/SkBitmap.h"
10 #include "ui/app_list/app_list_constants.h" 10 #include "ui/app_list/app_list_constants.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 return AppListModel::AddItemToFolder(make_scoped_ptr(item), folder_id); 66 return AppListModel::AddItemToFolder(make_scoped_ptr(item), folder_id);
67 } 67 }
68 68
69 void AppListTestModel::MoveItemToFolder(AppListItem* item, 69 void AppListTestModel::MoveItemToFolder(AppListItem* item,
70 const std::string& folder_id) { 70 const std::string& folder_id) {
71 AppListModel::MoveItemToFolder(item, folder_id); 71 AppListModel::MoveItemToFolder(item, folder_id);
72 } 72 }
73 73
74 74
75 std::string AppListTestModel::GetItemName(int id) { 75 std::string AppListTestModel::GetItemName(int id) {
76 return base::StringPrintf("Item %d", id); 76 return base::StringPrintf("Item %d with a longer name and stuff", id);
77 } 77 }
78 78
79 void AppListTestModel::PopulateApps(int n) { 79 void AppListTestModel::PopulateApps(int n) {
80 int start_index = static_cast<int>(top_level_item_list()->item_count()); 80 int start_index = static_cast<int>(top_level_item_list()->item_count());
81 for (int i = 0; i < n; ++i) 81 for (int i = 0; i < n; ++i)
82 CreateAndAddItem(GetItemName(start_index + i)); 82 CreateAndAddItem(GetItemName(start_index + i));
83 } 83 }
84 84
85 AppListFolderItem* AppListTestModel::CreateAndPopulateFolderWithApps(int n) { 85 AppListFolderItem* AppListTestModel::CreateAndPopulateFolderWithApps(int n) {
86 DCHECK_GT(n, 1); 86 DCHECK_GT(n, 1);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 top_level_item_list()->HighlightItemInstalledFromUI(item->id()); 154 top_level_item_list()->HighlightItemInstalledFromUI(item->id());
155 } 155 }
156 156
157 void AppListTestModel::ItemActivated(AppListTestItem* item) { 157 void AppListTestModel::ItemActivated(AppListTestItem* item) {
158 last_activated_ = item; 158 last_activated_ = item;
159 ++activate_count_; 159 ++activate_count_;
160 } 160 }
161 161
162 } // namespace test 162 } // namespace test
163 } // namespace app_list 163 } // namespace app_list
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/render_text.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698