Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: chrome/browser/ui/app_list/chrome_app_list_item.h

Issue 10871011: Move common app_list delegate code to chrome/browser/ui/app_list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Unit test file only in chrome Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 CHROME_BROWSER_UI_ASH_APP_LIST_CHROME_APP_LIST_ITEM_H_ 5 #ifndef CHROME_BROWSER_UI_APP_LIST_CHROME_APP_LIST_ITEM_H_
6 #define CHROME_BROWSER_UI_ASH_APP_LIST_CHROME_APP_LIST_ITEM_H_ 6 #define CHROME_BROWSER_UI_APP_LIST_CHROME_APP_LIST_ITEM_H_
7 7
8 #include "ui/app_list/app_list_item_model.h" 8 #include "ui/app_list/app_list_item_model.h"
9 9
10 // Base class of all chrome app list items. Chrome's AppListViewDelegate assumes 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 11 // all items are derived from this class and calls Activate when an item is
12 // activated. 12 // activated.
13 class ChromeAppListItem : public app_list::AppListItemModel { 13 class ChromeAppListItem : public app_list::AppListItemModel {
14 public: 14 public:
15 enum Type { 15 enum Type {
16 TYPE_APP, 16 TYPE_APP,
17 TYPE_OTHER, 17 TYPE_OTHER,
18 }; 18 };
19 19
20 // Activates the item. |event_flags| holds flags of a mouse/keyboard event 20 // Activates the item. |event_flags| holds flags of a mouse/keyboard event
21 // associated with this activation. 21 // associated with this activation.
22 virtual void Activate(int event_flags) = 0; 22 virtual void Activate(int event_flags) = 0;
23 23
24 Type type() const { return type_; } 24 Type type() const { return type_; }
25 25
26 protected: 26 protected:
27 explicit ChromeAppListItem(Type type) : type_(type) {} 27 explicit ChromeAppListItem(Type type) : type_(type) {}
28 virtual ~ChromeAppListItem() {} 28 virtual ~ChromeAppListItem() {}
29 29
30 private: 30 private:
31 Type type_; 31 Type type_;
32 32
33 DISALLOW_COPY_AND_ASSIGN(ChromeAppListItem); 33 DISALLOW_COPY_AND_ASSIGN(ChromeAppListItem);
34 }; 34 };
35 35
36 #endif // CHROME_BROWSER_UI_ASH_APP_LIST_CHROME_APP_LIST_ITEM_H_ 36 #endif // CHROME_BROWSER_UI_APP_LIST_CHROME_APP_LIST_ITEM_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/apps_model_builder_unittest.cc ('k') | chrome/browser/ui/app_list/extension_app_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698