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_VIEWS_APP_LIST_ITEM_VIEW_H_ | 5 #ifndef UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_ |
6 #define UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_ | 6 #define UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_ |
7 | 7 |
| 8 #include <memory> |
8 #include <string> | 9 #include <string> |
9 | 10 |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | |
13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
14 #include "base/timer/timer.h" | 14 #include "base/timer/timer.h" |
15 #include "ui/app_list/app_list_export.h" | 15 #include "ui/app_list/app_list_export.h" |
16 #include "ui/app_list/app_list_item_observer.h" | 16 #include "ui/app_list/app_list_item_observer.h" |
17 #include "ui/app_list/views/cached_label.h" | 17 #include "ui/app_list/views/cached_label.h" |
18 #include "ui/app_list/views/image_shadow_animator.h" | 18 #include "ui/app_list/views/image_shadow_animator.h" |
19 #include "ui/views/context_menu_controller.h" | 19 #include "ui/views/context_menu_controller.h" |
20 #include "ui/views/controls/button/custom_button.h" | 20 #include "ui/views/controls/button/custom_button.h" |
21 | 21 |
22 class SkBitmap; | 22 class SkBitmap; |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 const bool is_folder_; | 150 const bool is_folder_; |
151 const bool is_in_folder_; | 151 const bool is_in_folder_; |
152 | 152 |
153 AppListItem* item_weak_; // Owned by AppListModel. Can be NULL. | 153 AppListItem* item_weak_; // Owned by AppListModel. Can be NULL. |
154 | 154 |
155 AppsGridView* apps_grid_view_; // Parent view, owns this. | 155 AppsGridView* apps_grid_view_; // Parent view, owns this. |
156 views::ImageView* icon_; // Strongly typed child view. | 156 views::ImageView* icon_; // Strongly typed child view. |
157 CachedLabel* title_; // Strongly typed child view. | 157 CachedLabel* title_; // Strongly typed child view. |
158 ProgressBarView* progress_bar_; // Strongly typed child view. | 158 ProgressBarView* progress_bar_; // Strongly typed child view. |
159 | 159 |
160 scoped_ptr<views::MenuRunner> context_menu_runner_; | 160 std::unique_ptr<views::MenuRunner> context_menu_runner_; |
161 | 161 |
162 UIState ui_state_; | 162 UIState ui_state_; |
163 | 163 |
164 // True if scroll gestures should contribute to dragging. | 164 // True if scroll gestures should contribute to dragging. |
165 bool touch_dragging_; | 165 bool touch_dragging_; |
166 | 166 |
167 ImageShadowAnimator shadow_animator_; | 167 ImageShadowAnimator shadow_animator_; |
168 | 168 |
169 bool is_installing_; | 169 bool is_installing_; |
170 bool is_highlighted_; | 170 bool is_highlighted_; |
171 | 171 |
172 base::string16 tooltip_text_; | 172 base::string16 tooltip_text_; |
173 | 173 |
174 // A timer to defer showing drag UI when mouse is pressed. | 174 // A timer to defer showing drag UI when mouse is pressed. |
175 base::OneShotTimer mouse_drag_timer_; | 175 base::OneShotTimer mouse_drag_timer_; |
176 | 176 |
177 DISALLOW_COPY_AND_ASSIGN(AppListItemView); | 177 DISALLOW_COPY_AND_ASSIGN(AppListItemView); |
178 }; | 178 }; |
179 | 179 |
180 } // namespace app_list | 180 } // namespace app_list |
181 | 181 |
182 #endif // UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_ | 182 #endif // UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_ |
OLD | NEW |