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

Unified Diff: ash/launcher/launcher_model.cc

Issue 10829268: chromeos: Sync animation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unit_tests crash + rebase 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
« no previous file with comments | « ash/launcher/launcher_model.h ('k') | ash/launcher/launcher_model_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/launcher/launcher_model.cc
diff --git a/ash/launcher/launcher_model.cc b/ash/launcher/launcher_model.cc
index d9aa8adb3a618709f3763ca10b5ffb61b7be1ece..2945a5dc0bf0471927480aa27b365c02a8b75441 100644
--- a/ash/launcher/launcher_model.cc
+++ b/ash/launcher/launcher_model.cc
@@ -7,7 +7,6 @@
#include <algorithm>
#include "ash/launcher/launcher_model_observer.h"
-#include "ui/aura/window.h"
namespace ash {
@@ -37,7 +36,7 @@ bool CompareByWeight(const LauncherItem& a, const LauncherItem& b) {
} // namespace
-LauncherModel::LauncherModel() : next_id_(1) {
+LauncherModel::LauncherModel() : next_id_(1), status_(STATUS_NORMAL) {
LauncherItem app_list;
app_list.type = TYPE_APP_LIST;
app_list.is_incognito = false;
@@ -118,6 +117,15 @@ LauncherItems::const_iterator LauncherModel::ItemByID(int id) const {
return items_.end();
}
+void LauncherModel::SetStatus(Status status) {
+ if (status_ == status)
+ return;
+
+ status_ = status;
+ FOR_EACH_OBSERVER(LauncherModelObserver, observers_,
+ LauncherStatusChanged());
+}
+
void LauncherModel::AddObserver(LauncherModelObserver* observer) {
observers_.AddObserver(observer);
}
« no previous file with comments | « ash/launcher/launcher_model.h ('k') | ash/launcher/launcher_model_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698