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 ASH_APP_LIST_APP_LIST_ITEM_VIEW_H_ | 5 #ifndef UI_APP_LIST_APP_LIST_ITEM_VIEW_H_ |
6 #define ASH_APP_LIST_APP_LIST_ITEM_VIEW_H_ | 6 #define UI_APP_LIST_APP_LIST_ITEM_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ash/app_list/app_list_item_model_observer.h" | 9 #include <string> |
10 #include "ash/ash_export.h" | 10 |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "ui/app_list/app_list_export.h" |
| 15 #include "ui/app_list/app_list_item_model_observer.h" |
14 #include "ui/views/context_menu_controller.h" | 16 #include "ui/views/context_menu_controller.h" |
15 #include "ui/views/controls/button/custom_button.h" | 17 #include "ui/views/controls/button/custom_button.h" |
16 | 18 |
17 class SkBitmap; | 19 class SkBitmap; |
18 | 20 |
19 namespace views { | 21 namespace views { |
20 class ImageView; | 22 class ImageView; |
21 class MenuRunner; | 23 class MenuRunner; |
22 } | 24 } |
23 | 25 |
24 namespace ash { | 26 namespace app_list { |
25 | 27 |
26 class AppListItemModel; | 28 class AppListItemModel; |
27 class AppListModelView; | 29 class AppListModelView; |
28 class DropShadowLabel; | 30 class DropShadowLabel; |
29 | 31 |
30 class ASH_EXPORT AppListItemView : public views::CustomButton, | 32 class APP_LIST_EXPORT AppListItemView : public views::CustomButton, |
31 public views::ContextMenuController, | 33 public views::ContextMenuController, |
32 public AppListItemModelObserver { | 34 public AppListItemModelObserver { |
33 public: | 35 public: |
34 AppListItemView(AppListModelView* list_model_view, | 36 AppListItemView(AppListModelView* list_model_view, |
35 AppListItemModel* model, | 37 AppListItemModel* model, |
36 views::ButtonListener* listener); | 38 views::ButtonListener* listener); |
37 virtual ~AppListItemView(); | 39 virtual ~AppListItemView(); |
38 | 40 |
39 static gfx::Size GetPreferredSizeForIconSize(const gfx::Size& icon_size); | 41 static gfx::Size GetPreferredSizeForIconSize(const gfx::Size& icon_size); |
40 | 42 |
41 // For testing. Testing calls this function to set minimum title width in | 43 // For testing. Testing calls this function to set minimum title width in |
42 // pixels to get rid dependency on default font width. | 44 // pixels to get rid dependency on default font width. |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 100 |
99 gfx::Size icon_size_; | 101 gfx::Size icon_size_; |
100 bool selected_; | 102 bool selected_; |
101 | 103 |
102 scoped_refptr<IconOperation> icon_op_; | 104 scoped_refptr<IconOperation> icon_op_; |
103 base::WeakPtrFactory<AppListItemView> apply_shadow_factory_; | 105 base::WeakPtrFactory<AppListItemView> apply_shadow_factory_; |
104 | 106 |
105 DISALLOW_COPY_AND_ASSIGN(AppListItemView); | 107 DISALLOW_COPY_AND_ASSIGN(AppListItemView); |
106 }; | 108 }; |
107 | 109 |
108 } // namespace ash | 110 } // namespace app_list |
109 | 111 |
110 #endif // ASH_APP_LIST_APP_LIST_ITEM_VIEW_H_ | 112 #endif // UI_APP_LIST_APP_LIST_ITEM_VIEW_H_ |
OLD | NEW |