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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 private: | 56 private: |
57 enum UIState { | 57 enum UIState { |
58 UI_STATE_NORMAL, // Normal UI (icon + label) | 58 UI_STATE_NORMAL, // Normal UI (icon + label) |
59 UI_STATE_DRAGGING, // Dragging UI (scaled icon only) | 59 UI_STATE_DRAGGING, // Dragging UI (scaled icon only) |
60 }; | 60 }; |
61 | 61 |
62 // Get icon from model and schedule background processing. | 62 // Get icon from model and schedule background processing. |
63 void UpdateIcon(); | 63 void UpdateIcon(); |
64 | 64 |
| 65 // Update the tooltip text from the model. |
| 66 void UpdateTooltip(); |
| 67 |
65 void SetUIState(UIState state); | 68 void SetUIState(UIState state); |
66 | 69 |
67 // Sets |touch_dragging_| flag and updates UI. | 70 // Sets |touch_dragging_| flag and updates UI. |
68 void SetTouchDragging(bool touch_dragging); | 71 void SetTouchDragging(bool touch_dragging); |
69 | 72 |
70 // Invoked when |mouse_drag_timer_| fires to show dragging UI. | 73 // Invoked when |mouse_drag_timer_| fires to show dragging UI. |
71 void OnMouseDragTimer(); | 74 void OnMouseDragTimer(); |
72 | 75 |
73 // AppListItemModelObserver overrides: | 76 // AppListItemModelObserver overrides: |
74 virtual void ItemIconChanged() OVERRIDE; | 77 virtual void ItemIconChanged() OVERRIDE; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 124 |
122 // A timer to defer showing drag UI when mouse is pressed. | 125 // A timer to defer showing drag UI when mouse is pressed. |
123 base::OneShotTimer<AppListItemView> mouse_drag_timer_; | 126 base::OneShotTimer<AppListItemView> mouse_drag_timer_; |
124 | 127 |
125 DISALLOW_COPY_AND_ASSIGN(AppListItemView); | 128 DISALLOW_COPY_AND_ASSIGN(AppListItemView); |
126 }; | 129 }; |
127 | 130 |
128 } // namespace app_list | 131 } // namespace app_list |
129 | 132 |
130 #endif // UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_ | 133 #endif // UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_ |
OLD | NEW |