| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_APP_LIST_CHROME_APP_LIST_ITEM_H_ | |
| 6 #define CHROME_BROWSER_UI_APP_LIST_CHROME_APP_LIST_ITEM_H_ | |
| 7 | |
| 8 #include "ui/app_list/app_list_item_model.h" | |
| 9 | |
| 10 // Base class of all chrome app list items. Chrome's AppListViewDelegate assumes | |
| 11 // all items are derived from this class and calls Activate when an item is | |
| 12 // activated. | |
| 13 class ChromeAppListItem : public app_list::AppListItemModel { | |
| 14 public: | |
| 15 enum Type { | |
| 16 TYPE_APP, | |
| 17 TYPE_OTHER, | |
| 18 }; | |
| 19 | |
| 20 // Activates the item. |event_flags| holds flags of a mouse/keyboard event | |
| 21 // associated with this activation. | |
| 22 virtual void Activate(int event_flags) = 0; | |
| 23 | |
| 24 Type type() const { return type_; } | |
| 25 | |
| 26 protected: | |
| 27 explicit ChromeAppListItem(Type type) : type_(type) {} | |
| 28 virtual ~ChromeAppListItem() {} | |
| 29 | |
| 30 private: | |
| 31 Type type_; | |
| 32 | |
| 33 DISALLOW_COPY_AND_ASSIGN(ChromeAppListItem); | |
| 34 }; | |
| 35 | |
| 36 #endif // CHROME_BROWSER_UI_APP_LIST_CHROME_APP_LIST_ITEM_H_ | |
| OLD | NEW |