Chromium Code Reviews| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 100 // |folder_id| is empty. The item will be inserted before |position| or at | 100 // |folder_id| is empty. The item will be inserted before |position| or at |
| 101 // the end of the list if |position| is invalid. Note: |position| is copied | 101 // the end of the list if |position| is invalid. Note: |position| is copied |
| 102 // in case it refers to the containing folder which may get deleted. See also | 102 // in case it refers to the containing folder which may get deleted. See also |
| 103 // the comment for RemoveItemFromFolder. Returns true if the item was moved. | 103 // the comment for RemoveItemFromFolder. Returns true if the item was moved. |
| 104 // NOTE: This should only be called by the View code (not the sync code); it | 104 // NOTE: This should only be called by the View code (not the sync code); it |
| 105 // enforces folder restrictions (e.g. the source folder can not be type OEM). | 105 // enforces folder restrictions (e.g. the source folder can not be type OEM). |
| 106 bool MoveItemToFolderAt(AppListItem* item, | 106 bool MoveItemToFolderAt(AppListItem* item, |
| 107 const std::string& folder_id, | 107 const std::string& folder_id, |
| 108 syncer::StringOrdinal position); | 108 syncer::StringOrdinal position); |
| 109 | 109 |
| 110 // Wrapper around DeleteItem() which will also notify its parent folder; this | |
| 111 // allows observer to clean up folder with a single item remaining. | |
|
stevenjb
2015/03/23 19:34:30
nit: observers, folders
Greg Levin
2015/03/23 22:04:50
Done.
| |
| 112 void DeleteUninstalledItem(const std::string& id); | |
| 113 | |
| 110 // Sets the position of |item| either in |top_level_item_list_| or the folder | 114 // Sets the position of |item| either in |top_level_item_list_| or the folder |
| 111 // specified by |item|->folder_id(). If |new_position| is invalid, move the | 115 // specified by |item|->folder_id(). If |new_position| is invalid, move the |
| 112 // item to the end of the list. | 116 // item to the end of the list. |
| 113 void SetItemPosition(AppListItem* item, | 117 void SetItemPosition(AppListItem* item, |
| 114 const syncer::StringOrdinal& new_position); | 118 const syncer::StringOrdinal& new_position); |
| 115 | 119 |
| 116 // Sets the name of |item| and notifies observers. | 120 // Sets the name of |item| and notifies observers. |
| 117 void SetItemName(AppListItem* item, const std::string& name); | 121 void SetItemName(AppListItem* item, const std::string& name); |
| 118 | 122 |
| 119 // Sets the name and short name of |item| and notifies observers. | 123 // Sets the name and short name of |item| and notifies observers. |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 224 | 228 |
| 225 // The current number of subpages the custom launcher page has pushed. | 229 // The current number of subpages the custom launcher page has pushed. |
| 226 int custom_launcher_page_subpage_depth_; | 230 int custom_launcher_page_subpage_depth_; |
| 227 | 231 |
| 228 DISALLOW_COPY_AND_ASSIGN(AppListModel); | 232 DISALLOW_COPY_AND_ASSIGN(AppListModel); |
| 229 }; | 233 }; |
| 230 | 234 |
| 231 } // namespace app_list | 235 } // namespace app_list |
| 232 | 236 |
| 233 #endif // UI_APP_LIST_APP_LIST_MODEL_H_ | 237 #endif // UI_APP_LIST_APP_LIST_MODEL_H_ |
| OLD | NEW |