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

Unified Diff: ui/app_list/app_list_model.h

Issue 11371003: app_list: Add sync animation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix missed init Created 8 years, 1 month 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
« no previous file with comments | « ui/app_list/app_list.gyp ('k') | ui/app_list/app_list_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/app_list_model.h
diff --git a/ui/app_list/app_list_model.h b/ui/app_list/app_list_model.h
index d0c5923c4c0dd9acf4005ac1fb91c0cdef9a309c..4c46a0123297d05aed9d25ece397e5506475c711 100644
--- a/ui/app_list/app_list_model.h
+++ b/ui/app_list/app_list_model.h
@@ -7,12 +7,14 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
+#include "base/observer_list.h"
#include "ui/app_list/app_list_export.h"
#include "ui/base/models/list_model.h"
namespace app_list {
class AppListItemModel;
+class AppListModelObserver;
class SearchBoxModel;
class SearchResult;
@@ -22,15 +24,26 @@ class SearchResult;
// the model for SearchBoxView. SearchResults owns a list of SearchResult.
class APP_LIST_EXPORT AppListModel {
public:
+ enum Status {
+ STATUS_NORMAL,
+ STATUS_SYNCING, // Syncing apps or installing synced apps.
+ };
+
typedef ui::ListModel<AppListItemModel> Apps;
typedef ui::ListModel<SearchResult> SearchResults;
AppListModel();
~AppListModel();
+ void AddObserver(AppListModelObserver* observer);
+ void RemoveObserver(AppListModelObserver* observer);
+
+ void SetStatus(Status status);
+
Apps* apps() { return apps_.get(); }
SearchBoxModel* search_box() { return search_box_.get(); }
SearchResults* results() { return results_.get(); }
+ Status status() const { return status_; }
private:
scoped_ptr<Apps> apps_;
@@ -38,6 +51,9 @@ class APP_LIST_EXPORT AppListModel {
scoped_ptr<SearchBoxModel> search_box_;
scoped_ptr<SearchResults> results_;
+ Status status_;
+ ObserverList<AppListModelObserver> observers_;
+
DISALLOW_COPY_AND_ASSIGN(AppListModel);
};
« no previous file with comments | « ui/app_list/app_list.gyp ('k') | ui/app_list/app_list_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698