| 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 UI_APP_LIST_APP_LIST_MODEL_H_ | 5 #ifndef UI_APP_LIST_APP_LIST_MODEL_H_ |
| 6 #define UI_APP_LIST_APP_LIST_MODEL_H_ | 6 #define UI_APP_LIST_APP_LIST_MODEL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 128 |
| 129 SearchBoxModel* search_box() { return search_box_.get(); } | 129 SearchBoxModel* search_box() { return search_box_.get(); } |
| 130 SearchResults* results() { return results_.get(); } | 130 SearchResults* results() { return results_.get(); } |
| 131 Status status() const { return status_; } | 131 Status status() const { return status_; } |
| 132 bool folders_enabled() const { return folders_enabled_; } | 132 bool folders_enabled() const { return folders_enabled_; } |
| 133 | 133 |
| 134 private: | 134 private: |
| 135 // AppListItemListObserver | 135 // AppListItemListObserver |
| 136 virtual void OnListItemMoved(size_t from_index, | 136 virtual void OnListItemMoved(size_t from_index, |
| 137 size_t to_index, | 137 size_t to_index, |
| 138 AppListItem* item) OVERRIDE; | 138 AppListItem* item) override; |
| 139 | 139 |
| 140 // Returns an existing folder matching |folder_id| or creates a new folder. | 140 // Returns an existing folder matching |folder_id| or creates a new folder. |
| 141 AppListFolderItem* FindOrCreateFolderItem(const std::string& folder_id); | 141 AppListFolderItem* FindOrCreateFolderItem(const std::string& folder_id); |
| 142 | 142 |
| 143 // Adds |item_ptr| to |top_level_item_list_| and notifies observers. | 143 // Adds |item_ptr| to |top_level_item_list_| and notifies observers. |
| 144 AppListItem* AddItemToItemListAndNotify( | 144 AppListItem* AddItemToItemListAndNotify( |
| 145 scoped_ptr<AppListItem> item_ptr); | 145 scoped_ptr<AppListItem> item_ptr); |
| 146 | 146 |
| 147 // Adds |item_ptr| to |top_level_item_list_| and notifies observers that an | 147 // Adds |item_ptr| to |top_level_item_list_| and notifies observers that an |
| 148 // Update occured (e.g. item moved from a folder). | 148 // Update occured (e.g. item moved from a folder). |
| (...skipping 22 matching lines...) Expand all Loading... |
| 171 Status status_; | 171 Status status_; |
| 172 ObserverList<AppListModelObserver, true> observers_; | 172 ObserverList<AppListModelObserver, true> observers_; |
| 173 bool folders_enabled_; | 173 bool folders_enabled_; |
| 174 | 174 |
| 175 DISALLOW_COPY_AND_ASSIGN(AppListModel); | 175 DISALLOW_COPY_AND_ASSIGN(AppListModel); |
| 176 }; | 176 }; |
| 177 | 177 |
| 178 } // namespace app_list | 178 } // namespace app_list |
| 179 | 179 |
| 180 #endif // UI_APP_LIST_APP_LIST_MODEL_H_ | 180 #endif // UI_APP_LIST_APP_LIST_MODEL_H_ |
| OLD | NEW |