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

Unified Diff: chrome/browser/ui/ash/app_list/apps_model_builder.h

Issue 10871011: Move common app_list delegate code to chrome/browser/ui/app_list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Unit test file only in chrome Created 8 years, 4 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: chrome/browser/ui/ash/app_list/apps_model_builder.h
diff --git a/chrome/browser/ui/ash/app_list/apps_model_builder.h b/chrome/browser/ui/ash/app_list/apps_model_builder.h
deleted file mode 100644
index b97513326fd09410ec4051ee14d513ccf983603d..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/ash/app_list/apps_model_builder.h
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_UI_ASH_APP_LIST_APPS_MODEL_BUILDER_H_
-#define CHROME_BROWSER_UI_ASH_APP_LIST_APPS_MODEL_BUILDER_H_
-
-#include <string>
-#include <vector>
-
-#include "base/gtest_prod_util.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
-#include "ui/app_list/app_list_model.h"
-
-class AppListController;
-class Profile;
-
-class AppsModelBuilder : public content::NotificationObserver {
- public:
- AppsModelBuilder(Profile* profile,
- app_list::AppListModel::Apps* model,
- AppListController* controller);
- virtual ~AppsModelBuilder();
-
- // Populates the model.
- void Build();
-
- private:
- typedef std::vector<app_list::AppListItemModel*> Apps;
-
- FRIEND_TEST_ALL_PREFIXES(AppsModelBuilderTest, GetExtensionApps);
- FRIEND_TEST_ALL_PREFIXES(AppsModelBuilderTest, SortAndPopulateModel);
- FRIEND_TEST_ALL_PREFIXES(AppsModelBuilderTest, InsertItemByTitle);
-
- void SortAndPopulateModel(const Apps& apps);
- void InsertItemByTitle(app_list::AppListItemModel* app);
-
- void GetExtensionApps(Apps* apps);
- void CreateSpecialApps();
-
- // Returns the index of the application app with |app_id| in |model_|. If
- // no match is found, returns -1.
- int FindApp(const std::string& app_id);
-
- // Sets the application app with |highlight_app_id_| in |model_| as
- // highlighted. If such an app is found, reset |highlight_app_id_| so that it
- // is highlighted once per install notification.
- void HighlightApp();
-
- // content::NotificationObserver
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
-
- Profile* profile_;
- AppListController* controller_;
-
- // Sub apps model of AppListModel that represents apps grid view.
- app_list::AppListModel::Apps* model_;
-
- // Number of special apps in the model. Special apps index should be ranged
- // from [0, special_apps_count_ - 1].
- int special_apps_count_;
-
- std::string highlight_app_id_;
-
- content::NotificationRegistrar registrar_;
-
- DISALLOW_COPY_AND_ASSIGN(AppsModelBuilder);
-};
-
-#endif // CHROME_BROWSER_UI_ASH_APP_LIST_APPS_MODEL_BUILDER_H_
« no previous file with comments | « chrome/browser/ui/ash/app_list/app_list_view_delegate.cc ('k') | chrome/browser/ui/ash/app_list/apps_model_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698