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

Unified Diff: ui/app_list/test/app_list_test_model.h

Issue 27438002: Store AppItems as pages in AppListModel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: ui/app_list/test/app_list_test_model.h
diff --git a/ui/app_list/test/app_list_test_model.h b/ui/app_list/test/app_list_test_model.h
index c0f9c0f7674158fb66ff9007421be55ceee9992b..0e2ee4d9d924ff567240fb10dd86db3ada487eeb 100644
--- a/ui/app_list/test/app_list_test_model.h
+++ b/ui/app_list/test/app_list_test_model.h
@@ -20,6 +20,9 @@ class AppListTestModel : public AppListModel {
public:
AppListTestModel();
+ // Generates a name based on |id|.
+ std::string GetItemName(int id);
+
// Populate the model with |n| items titled "Item #".
void PopulateApps(int n);
@@ -29,15 +32,15 @@ class AppListTestModel : public AppListModel {
// Get a string of all apps in |model| joined with ','.
std::string GetModelContent();
+ // Creates an item with |title| and |full_name|.
AppListItemModel* CreateItem(const std::string& title,
const std::string& full_name);
- // Add an item with arbitrary |title| and |full_name| to the model.
- void AddItem(const std::string& title, const std::string& full_name);
+ // Creates and adds an item with |title| and |full_name| to the model.
+ void CreateAndAddItem(const std::string& title, const std::string& full_name);
- // Add an item with arbitrary |title| to the model. This is a convenience
- // version which will use the title for the full_name.
- void AddItem(const std::string& title);
+ // Convenience version of CreateAndAddItem(title, title).
+ void CreateAndAddItem(const std::string& title);
// Call SetHighlighted on the specified item.
void HighlightItemAt(int index);

Powered by Google App Engine
This is Rietveld 408576698