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

Side by Side Diff: ash/launcher/launcher_model.h

Issue 17673004: Insert panel icons on the left of other panel icons. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix test assertions. Created 7 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | ash/launcher/launcher_model.cc » ('j') | ash/launcher/launcher_model.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ASH_LAUNCHER_LAUNCHER_MODEL_H_ 5 #ifndef ASH_LAUNCHER_LAUNCHER_MODEL_H_
6 #define ASH_LAUNCHER_LAUNCHER_MODEL_H_ 6 #define ASH_LAUNCHER_LAUNCHER_MODEL_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/launcher/launcher_types.h" 9 #include "ash/launcher/launcher_types.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/observer_list.h" 11 #include "base/observer_list.h"
12 12
13 namespace ash { 13 namespace ash {
14 14
15 class LauncherModelObserver; 15 class LauncherModelObserver;
16 16
17 // Model used by LauncherView. 17 // Model used by LauncherView.
18 class ASH_EXPORT LauncherModel { 18 class ASH_EXPORT LauncherModel {
19 public: 19 public:
20 enum Status { 20 enum Status {
21 STATUS_NORMAL, 21 STATUS_NORMAL,
22 // A status that indicates apps are syncing/loading. 22 // A status that indicates apps are syncing/loading.
23 STATUS_LOADING, 23 STATUS_LOADING,
24 }; 24 };
25 25
26 // The index to use when adding an item to automatically position it by
27 // item type.
28 static const int kAutomaticIndex;
29
26 LauncherModel(); 30 LauncherModel();
27 ~LauncherModel(); 31 ~LauncherModel();
28 32
29 // Adds a new item to the model. Returns the resulting index. 33 // Adds a new item to the model. Returns the resulting index.
30 int Add(const LauncherItem& item); 34 int Add(const LauncherItem& item);
31 35
32 // Adds the item. |index| is the requested insertion index, which may be 36 // Adds the item. |index| is the requested insertion index, which may be
33 // modified to meet type-based ordering. Returns the actual insertion index. 37 // modified to meet type-based ordering. Returns the actual insertion index.
34 int AddAt(int index, const LauncherItem& item); 38 int AddAt(int index, const LauncherItem& item);
35 39
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 LauncherItems items_; 86 LauncherItems items_;
83 Status status_; 87 Status status_;
84 ObserverList<LauncherModelObserver> observers_; 88 ObserverList<LauncherModelObserver> observers_;
85 89
86 DISALLOW_COPY_AND_ASSIGN(LauncherModel); 90 DISALLOW_COPY_AND_ASSIGN(LauncherModel);
87 }; 91 };
88 92
89 } // namespace ash 93 } // namespace ash
90 94
91 #endif // ASH_LAUNCHER_LAUNCHER_MODEL_H_ 95 #endif // ASH_LAUNCHER_LAUNCHER_MODEL_H_
OLDNEW
« no previous file with comments | « no previous file | ash/launcher/launcher_model.cc » ('j') | ash/launcher/launcher_model.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698