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

Side by Side Diff: ui/app_list/app_list_item_model.h

Issue 25859005: Elim ActivateAppListItem, ChromeAppListItem (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compile fixes Created 7 years, 2 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
« no previous file with comments | « chrome/chrome_browser_ui.gypi ('k') | ui/app_list/app_list_item_model.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 UI_APP_LIST_APP_LIST_ITEM_MODEL_H_ 5 #ifndef UI_APP_LIST_APP_LIST_ITEM_MODEL_H_
6 #define UI_APP_LIST_APP_LIST_ITEM_MODEL_H_ 6 #define UI_APP_LIST_APP_LIST_ITEM_MODEL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 void SetPercentDownloaded(int percent_downloaded); 45 void SetPercentDownloaded(int percent_downloaded);
46 int percent_downloaded() const { return percent_downloaded_; } 46 int percent_downloaded() const { return percent_downloaded_; }
47 47
48 void set_app_id(const std::string& app_id) { app_id_ = app_id; } 48 void set_app_id(const std::string& app_id) { app_id_ = app_id; }
49 const std::string& app_id() { return app_id_; } 49 const std::string& app_id() { return app_id_; }
50 50
51 void AddObserver(AppListItemModelObserver* observer); 51 void AddObserver(AppListItemModelObserver* observer);
52 void RemoveObserver(AppListItemModelObserver* observer); 52 void RemoveObserver(AppListItemModelObserver* observer);
53 53
54 // Activates (opens) the item. Does nothing by default.
55 virtual void Activate(int event_flags);
56
54 // Returns the context menu model for this item, or NULL if there is currently 57 // Returns the context menu model for this item, or NULL if there is currently
55 // no menu for the item (e.g. during install). 58 // no menu for the item (e.g. during install).
56 // Note the returned menu model is owned by this item. 59 // Note the returned menu model is owned by this item.
57 virtual ui::MenuModel* GetContextMenuModel(); 60 virtual ui::MenuModel* GetContextMenuModel();
58 61
59 private: 62 private:
60 gfx::ImageSkia icon_; 63 gfx::ImageSkia icon_;
61 bool has_shadow_; 64 bool has_shadow_;
62 std::string title_; 65 std::string title_;
63 std::string full_name_; 66 std::string full_name_;
64 bool highlighted_; 67 bool highlighted_;
65 bool is_installing_; 68 bool is_installing_;
66 int percent_downloaded_; 69 int percent_downloaded_;
67 std::string app_id_; 70 std::string app_id_;
68 71
69 ObserverList<AppListItemModelObserver> observers_; 72 ObserverList<AppListItemModelObserver> observers_;
70 73
71 DISALLOW_COPY_AND_ASSIGN(AppListItemModel); 74 DISALLOW_COPY_AND_ASSIGN(AppListItemModel);
72 }; 75 };
73 76
74 } // namespace app_list 77 } // namespace app_list
75 78
76 #endif // UI_APP_LIST_APP_LIST_ITEM_MODEL_H_ 79 #endif // UI_APP_LIST_APP_LIST_ITEM_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/chrome_browser_ui.gypi ('k') | ui/app_list/app_list_item_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698