| Index: ash/launcher/launcher_model.h
|
| diff --git a/ash/launcher/launcher_model.h b/ash/launcher/launcher_model.h
|
| index d4cd05eb367b522fb15c1bca1c0a95e3b2a65f36..374566e1eaaea0fffb45492036e3fd119b7249d0 100644
|
| --- a/ash/launcher/launcher_model.h
|
| +++ b/ash/launcher/launcher_model.h
|
| @@ -22,6 +22,12 @@ class LauncherModelObserver;
|
| // Model used by LauncherView.
|
| class ASH_EXPORT LauncherModel {
|
| public:
|
| + enum UIState {
|
| + NORMAL,
|
| + // In this state, Launcher shows a loading animation.
|
| + LOADING,
|
| + };
|
| +
|
| LauncherModel();
|
| ~LauncherModel();
|
|
|
| @@ -59,16 +65,26 @@ class ASH_EXPORT LauncherModel {
|
| void AddObserver(LauncherModelObserver* observer);
|
| void RemoveObserver(LauncherModelObserver* observer);
|
|
|
| + void SetUIState(UIState ui_state);
|
| + UIState ui_state() const { return ui_state_; }
|
| +
|
| private:
|
| // Makes sure |index| is in line with the type-based order of items. If that
|
| // is not the case, adjusts index by shifting it to the valid range and
|
| // returns the new value.
|
| int ValidateInsertionIndex(LauncherItemType type, int index) const;
|
|
|
| + // Gets desired number of loading placeholders.
|
| + int GetDesiredNumOfPlaceholders();
|
| +
|
| + // Ensures the model has exactly |n| loading placeholders.
|
| + void UpdatePlaceholders(int n);
|
| +
|
| // ID assigned to the next item.
|
| LauncherID next_id_;
|
| LauncherItems items_;
|
| ObserverList<LauncherModelObserver> observers_;
|
| + UIState ui_state_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(LauncherModel);
|
| };
|
|
|