| 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_FOLDER_ITEM_H_ | 5 #ifndef UI_APP_LIST_APP_LIST_FOLDER_ITEM_H_ |
| 6 #define UI_APP_LIST_APP_LIST_FOLDER_ITEM_H_ | 6 #define UI_APP_LIST_APP_LIST_FOLDER_ITEM_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 AppListItemList* item_list() { return item_list_.get(); } | 37 AppListItemList* item_list() { return item_list_.get(); } |
| 38 | 38 |
| 39 static const char kItemType[]; | 39 static const char kItemType[]; |
| 40 | 40 |
| 41 // Calculates the top item icons' bounds inside |folder_icon_bounds|. | 41 // Calculates the top item icons' bounds inside |folder_icon_bounds|. |
| 42 // Returns the bounds of top item icons in sequence of top left, top right, | 42 // Returns the bounds of top item icons in sequence of top left, top right, |
| 43 // bottom left, bottom right. | 43 // bottom left, bottom right. |
| 44 static Rects GetTopIconsBounds(const gfx::Rect& folder_icon_bounds); | 44 static Rects GetTopIconsBounds(const gfx::Rect& folder_icon_bounds); |
| 45 | 45 |
| 46 // Returns an id for a new folder. |
| 47 static std::string GenerateId(); |
| 48 |
| 46 private: | 49 private: |
| 47 // AppListItem | 50 // AppListItem |
| 48 virtual void Activate(int event_flags) OVERRIDE; | 51 virtual void Activate(int event_flags) OVERRIDE; |
| 49 virtual const char* GetItemType() const OVERRIDE; | 52 virtual const char* GetItemType() const OVERRIDE; |
| 50 virtual ui::MenuModel* GetContextMenuModel() OVERRIDE; | 53 virtual ui::MenuModel* GetContextMenuModel() OVERRIDE; |
| 51 | 54 |
| 52 // AppListItemObserver | 55 // AppListItemObserver |
| 53 virtual void ItemIconChanged() OVERRIDE; | 56 virtual void ItemIconChanged() OVERRIDE; |
| 54 virtual void ItemTitleChanged() OVERRIDE; | 57 virtual void ItemTitleChanged() OVERRIDE; |
| 55 virtual void ItemHighlightedChanged() OVERRIDE; | 58 virtual void ItemHighlightedChanged() OVERRIDE; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 69 scoped_ptr<AppListItemList> item_list_; | 72 scoped_ptr<AppListItemList> item_list_; |
| 70 // Top items for generating folder icon. | 73 // Top items for generating folder icon. |
| 71 std::vector<AppListItem*> top_items_; | 74 std::vector<AppListItem*> top_items_; |
| 72 | 75 |
| 73 DISALLOW_COPY_AND_ASSIGN(AppListFolderItem); | 76 DISALLOW_COPY_AND_ASSIGN(AppListFolderItem); |
| 74 }; | 77 }; |
| 75 | 78 |
| 76 } // namespace app_list | 79 } // namespace app_list |
| 77 | 80 |
| 78 #endif // UI_APP_LIST_APP_LIST_FOLDER_ITEM_H_ | 81 #endif // UI_APP_LIST_APP_LIST_FOLDER_ITEM_H_ |
| OLD | NEW |