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

Unified Diff: ui/app_list/app_list_model.cc

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_model.h ('k') | ui/app_list/app_list_model_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/app_list_model.cc
diff --git a/ui/app_list/app_list_model.cc b/ui/app_list/app_list_model.cc
index a4a8193f9057e6200088a071c9a7cdf4b3e0b15c..4f473efbc36a7fe0e134522219338ae7f13e0dc4 100644
--- a/ui/app_list/app_list_model.cc
+++ b/ui/app_list/app_list_model.cc
@@ -5,6 +5,7 @@
#include "ui/app_list/app_list_model.h"
#include "ui/app_list/app_list_item_model.h"
+#include "ui/app_list/app_list_model_observer.h"
#include "ui/app_list/search_box_model.h"
#include "ui/app_list/search_result.h"
@@ -13,10 +14,29 @@ namespace app_list {
AppListModel::AppListModel()
: apps_(new Apps),
search_box_(new SearchBoxModel),
- results_(new SearchResults) {
+ results_(new SearchResults),
+ status_(STATUS_NORMAL) {
}
AppListModel::~AppListModel() {
}
+void AppListModel::AddObserver(AppListModelObserver* observer) {
+ observers_.AddObserver(observer);
+}
+
+void AppListModel::RemoveObserver(AppListModelObserver* observer) {
+ observers_.RemoveObserver(observer);
+}
+
+void AppListModel::SetStatus(Status status) {
+ if (status_ == status)
+ return;
+
+ status_ = status;
+ FOR_EACH_OBSERVER(AppListModelObserver,
+ observers_,
+ OnAppListModelStatusChanged());
+}
+
} // namespace app_list
« no previous file with comments | « ui/app_list/app_list_model.h ('k') | ui/app_list/app_list_model_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698