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_AURA_SHELL_APP_LIST_APP_LIST_ITEM_MODEL_H_ | 5 #ifndef UI_APP_LIST_APP_LIST_ITEM_MODEL_H_ |
6 #define UI_AURA_SHELL_APP_LIST_APP_LIST_ITEM_MODEL_H_ | 6 #define UI_APP_LIST_APP_LIST_ITEM_MODEL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/observer_list.h" | 12 #include "base/observer_list.h" |
13 #include "third_party/skia/include/core/SkBitmap.h" | 13 #include "third_party/skia/include/core/SkBitmap.h" |
14 #include "ash/ash_export.h" | 14 #include "ui/app_list/app_list_export.h" |
15 | 15 |
16 namespace ui { | 16 namespace ui { |
17 class MenuModel; | 17 class MenuModel; |
18 } | 18 } |
19 | 19 |
20 namespace ash { | 20 namespace app_list { |
21 | 21 |
22 class AppListItemModelObserver; | 22 class AppListItemModelObserver; |
23 | 23 |
24 // AppListItemModel provides icon and title to be shown in a AppListItemView | 24 // AppListItemModel provides icon and title to be shown in a AppListItemView |
25 // and action to be executed when the AppListItemView is activated. | 25 // and action to be executed when the AppListItemView is activated. |
26 class ASH_EXPORT AppListItemModel { | 26 class APP_LIST_EXPORT AppListItemModel { |
27 public: | 27 public: |
28 AppListItemModel(); | 28 AppListItemModel(); |
29 virtual ~AppListItemModel(); | 29 virtual ~AppListItemModel(); |
30 | 30 |
31 void SetIcon(const SkBitmap& icon); | 31 void SetIcon(const SkBitmap& icon); |
32 const SkBitmap& icon() const { | 32 const SkBitmap& icon() const { |
33 return icon_; | 33 return icon_; |
34 } | 34 } |
35 | 35 |
36 void SetTitle(const std::string& title); | 36 void SetTitle(const std::string& title); |
(...skipping 16 matching lines...) Expand all Loading... |
53 private: | 53 private: |
54 SkBitmap icon_; | 54 SkBitmap icon_; |
55 std::string title_; | 55 std::string title_; |
56 bool highlighted_; | 56 bool highlighted_; |
57 | 57 |
58 ObserverList<AppListItemModelObserver> observers_; | 58 ObserverList<AppListItemModelObserver> observers_; |
59 | 59 |
60 DISALLOW_COPY_AND_ASSIGN(AppListItemModel); | 60 DISALLOW_COPY_AND_ASSIGN(AppListItemModel); |
61 }; | 61 }; |
62 | 62 |
63 } // namespace ash | 63 } // namespace app_list |
64 | 64 |
65 #endif // #define ASH_APP_LIST_APP_LIST_ITEM_MODEL_OBSERVER_H_ | 65 #endif // UI_APP_LIST_APP_LIST_ITEM_MODEL_H_ |
OLD | NEW |