| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 virtual ~AppListItemView(); | 41 virtual ~AppListItemView(); |
| 42 | 42 |
| 43 void SetIconSize(const gfx::Size& size); | 43 void SetIconSize(const gfx::Size& size); |
| 44 | 44 |
| 45 void Prerender(); | 45 void Prerender(); |
| 46 | 46 |
| 47 AppListItemModel* model() const { return model_; } | 47 AppListItemModel* model() const { return model_; } |
| 48 | 48 |
| 49 const views::Label* title() const { return title_; } | 49 const views::Label* title() const { return title_; } |
| 50 | 50 |
| 51 gfx::ImageSkia GetDragImage(); |
| 52 |
| 51 private: | 53 private: |
| 52 enum UIState { | 54 enum UIState { |
| 53 UI_STATE_NORMAL, // Normal UI (icon + label) | 55 UI_STATE_NORMAL, // Normal UI (icon + label) |
| 54 UI_STATE_DRAGGING, // Dragging UI (scaled icon only) | 56 UI_STATE_DRAGGING, // Dragging UI (scaled icon only) |
| 55 }; | 57 }; |
| 56 | 58 |
| 57 // Get icon from model and schedule background processing. | 59 // Get icon from model and schedule background processing. |
| 58 void UpdateIcon(); | 60 void UpdateIcon(); |
| 59 | 61 |
| 60 void SetUIState(UIState state); | 62 void SetUIState(UIState state); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 | 117 |
| 116 // A timer to defer showing drag UI when mouse is pressed. | 118 // A timer to defer showing drag UI when mouse is pressed. |
| 117 base::OneShotTimer<AppListItemView> mouse_drag_timer_; | 119 base::OneShotTimer<AppListItemView> mouse_drag_timer_; |
| 118 | 120 |
| 119 DISALLOW_COPY_AND_ASSIGN(AppListItemView); | 121 DISALLOW_COPY_AND_ASSIGN(AppListItemView); |
| 120 }; | 122 }; |
| 121 | 123 |
| 122 } // namespace app_list | 124 } // namespace app_list |
| 123 | 125 |
| 124 #endif // UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_ | 126 #endif // UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_ |
| OLD | NEW |