| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_ITEM_H_ | 5 #ifndef UI_APP_LIST_APP_LIST_ITEM_H_ |
| 6 #define UI_APP_LIST_APP_LIST_ITEM_H_ | 6 #define UI_APP_LIST_APP_LIST_ITEM_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 // Note the returned menu model is owned by this item. | 76 // Note the returned menu model is owned by this item. |
| 77 virtual ui::MenuModel* GetContextMenuModel(); | 77 virtual ui::MenuModel* GetContextMenuModel(); |
| 78 | 78 |
| 79 // Returns the item matching |id| contained in this item (e.g. if the item is | 79 // Returns the item matching |id| contained in this item (e.g. if the item is |
| 80 // a folder), or NULL if the item was not found or this is not a container. | 80 // a folder), or NULL if the item was not found or this is not a container. |
| 81 virtual AppListItem* FindChildItem(const std::string& id); | 81 virtual AppListItem* FindChildItem(const std::string& id); |
| 82 | 82 |
| 83 // Returns the number of child items if it has any (e.g. is a folder) or 0. | 83 // Returns the number of child items if it has any (e.g. is a folder) or 0. |
| 84 virtual size_t ChildItemCount() const; | 84 virtual size_t ChildItemCount() const; |
| 85 | 85 |
| 86 // Called when the extension preference changed. Used by ExtensionAppItem | |
| 87 // to update icon overlays. | |
| 88 virtual void OnExtensionPreferenceChanged(); | |
| 89 | |
| 90 // Utility functions for sync integration tests. | 86 // Utility functions for sync integration tests. |
| 91 virtual bool CompareForTest(const AppListItem* other) const; | 87 virtual bool CompareForTest(const AppListItem* other) const; |
| 92 virtual std::string ToDebugString() const; | 88 virtual std::string ToDebugString() const; |
| 93 | 89 |
| 94 protected: | 90 protected: |
| 95 friend class ::FastShowPickler; | 91 friend class ::FastShowPickler; |
| 96 friend class AppListItemList; | 92 friend class AppListItemList; |
| 97 friend class AppListItemListTest; | 93 friend class AppListItemListTest; |
| 98 friend class AppListModel; | 94 friend class AppListModel; |
| 99 | 95 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 int percent_downloaded_; | 130 int percent_downloaded_; |
| 135 | 131 |
| 136 base::ObserverList<AppListItemObserver> observers_; | 132 base::ObserverList<AppListItemObserver> observers_; |
| 137 | 133 |
| 138 DISALLOW_COPY_AND_ASSIGN(AppListItem); | 134 DISALLOW_COPY_AND_ASSIGN(AppListItem); |
| 139 }; | 135 }; |
| 140 | 136 |
| 141 } // namespace app_list | 137 } // namespace app_list |
| 142 | 138 |
| 143 #endif // UI_APP_LIST_APP_LIST_ITEM_H_ | 139 #endif // UI_APP_LIST_APP_LIST_ITEM_H_ |
| OLD | NEW |