OLD | NEW |
---|---|
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 25 matching lines...) Expand all Loading... | |
36 | 36 |
37 void SetHighlighted(bool highlighted); | 37 void SetHighlighted(bool highlighted); |
38 bool highlighted() const { return highlighted_; } | 38 bool highlighted() const { return highlighted_; } |
39 | 39 |
40 void SetIsInstalling(bool is_installing); | 40 void SetIsInstalling(bool is_installing); |
41 bool is_installing() const { return is_installing_; } | 41 bool is_installing() const { return is_installing_; } |
42 | 42 |
43 void SetPercentDownloaded(int percent_downloaded); | 43 void SetPercentDownloaded(int percent_downloaded); |
44 int percent_downloaded() const { return percent_downloaded_; } | 44 int percent_downloaded() const { return percent_downloaded_; } |
45 | 45 |
46 void SetAppId(const std::string& app_id); | |
benwells
2013/05/02 06:40:05
This should just be set_app_id (and inline) as the
Mr4D (OOO till 08-26)
2013/05/03 00:23:17
Done.
| |
47 const std::string& app_id() { return app_id_; } | |
48 | |
46 void AddObserver(AppListItemModelObserver* observer); | 49 void AddObserver(AppListItemModelObserver* observer); |
47 void RemoveObserver(AppListItemModelObserver* observer); | 50 void RemoveObserver(AppListItemModelObserver* observer); |
48 | 51 |
49 // Returns the context menu model for this item. | 52 // Returns the context menu model for this item. |
50 // Note the returned menu model is owned by this item. | 53 // Note the returned menu model is owned by this item. |
51 virtual ui::MenuModel* GetContextMenuModel(); | 54 virtual ui::MenuModel* GetContextMenuModel(); |
52 | 55 |
53 private: | 56 private: |
54 gfx::ImageSkia icon_; | 57 gfx::ImageSkia icon_; |
55 bool has_shadow_; | 58 bool has_shadow_; |
56 std::string title_; | 59 std::string title_; |
57 bool highlighted_; | 60 bool highlighted_; |
58 bool is_installing_; | 61 bool is_installing_; |
59 int percent_downloaded_; | 62 int percent_downloaded_; |
63 std::string app_id_; | |
60 | 64 |
61 ObserverList<AppListItemModelObserver> observers_; | 65 ObserverList<AppListItemModelObserver> observers_; |
62 | 66 |
63 DISALLOW_COPY_AND_ASSIGN(AppListItemModel); | 67 DISALLOW_COPY_AND_ASSIGN(AppListItemModel); |
64 }; | 68 }; |
65 | 69 |
66 } // namespace app_list | 70 } // namespace app_list |
67 | 71 |
68 #endif // UI_APP_LIST_APP_LIST_ITEM_MODEL_H_ | 72 #endif // UI_APP_LIST_APP_LIST_ITEM_MODEL_H_ |
OLD | NEW |