OLD | NEW |
---|---|
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" |
(...skipping 29 matching lines...) Expand all Loading... | |
40 // of the model *after* the item at |index| is removed. | 40 // of the model *after* the item at |index| is removed. |
41 void Move(int index, int target_index); | 41 void Move(int index, int target_index); |
42 | 42 |
43 // Resets the item at the specified index. The item maintains its existing | 43 // Resets the item at the specified index. The item maintains its existing |
44 // id and type. | 44 // id and type. |
45 void Set(int index, const LauncherItem& item); | 45 void Set(int index, const LauncherItem& item); |
46 | 46 |
47 // Returns the index of the item by id. | 47 // Returns the index of the item by id. |
48 int ItemIndexByID(int id) const; | 48 int ItemIndexByID(int id) const; |
49 | 49 |
50 // Returns the index of the first right aligned item. | |
51 int EndAlignedIndex() const; | |
stevenjb
2012/11/26 18:19:21
"EndAligned" confused me. Maybe "FirstRightAligned
flackr
2012/11/27 18:40:21
This can be bottom aligned if the panel position i
| |
52 | |
50 // Returns the id assigned to the next item added. | 53 // Returns the id assigned to the next item added. |
51 LauncherID next_id() const { return next_id_; } | 54 LauncherID next_id() const { return next_id_; } |
52 | 55 |
53 // Returns an iterator into items() for the item with the specified id, or | 56 // Returns an iterator into items() for the item with the specified id, or |
54 // items().end() if there is no item with the specified id. | 57 // items().end() if there is no item with the specified id. |
55 LauncherItems::const_iterator ItemByID(LauncherID id) const; | 58 LauncherItems::const_iterator ItemByID(LauncherID id) const; |
56 | 59 |
57 const LauncherItems& items() const { return items_; } | 60 const LauncherItems& items() const { return items_; } |
58 int item_count() const { return static_cast<int>(items_.size()); } | 61 int item_count() const { return static_cast<int>(items_.size()); } |
59 | 62 |
(...skipping 14 matching lines...) Expand all Loading... | |
74 LauncherItems items_; | 77 LauncherItems items_; |
75 Status status_; | 78 Status status_; |
76 ObserverList<LauncherModelObserver> observers_; | 79 ObserverList<LauncherModelObserver> observers_; |
77 | 80 |
78 DISALLOW_COPY_AND_ASSIGN(LauncherModel); | 81 DISALLOW_COPY_AND_ASSIGN(LauncherModel); |
79 }; | 82 }; |
80 | 83 |
81 } // namespace ash | 84 } // namespace ash |
82 | 85 |
83 #endif // ASH_LAUNCHER_LAUNCHER_MODEL_H_ | 86 #endif // ASH_LAUNCHER_LAUNCHER_MODEL_H_ |
OLD | NEW |