| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 void SetAsAttemptedFolderTarget(bool is_target_folder); | 54 void SetAsAttemptedFolderTarget(bool is_target_folder); |
| 55 | 55 |
| 56 AppListItem* item() const { return item_; } | 56 AppListItem* item() const { return item_; } |
| 57 | 57 |
| 58 const views::Label* title() const { return title_; } | 58 const views::Label* title() const { return title_; } |
| 59 | 59 |
| 60 // In a synchronous drag the item view isn't informed directly of the drag | 60 // In a synchronous drag the item view isn't informed directly of the drag |
| 61 // ending, so the runner of the drag should call this. | 61 // ending, so the runner of the drag should call this. |
| 62 void OnSyncDragEnd(); | 62 void OnSyncDragEnd(); |
| 63 | 63 |
| 64 // Returns the icon bounds relative to AppListItemView. |
| 65 const gfx::Rect& GetIconBounds() const; |
| 66 |
| 64 private: | 67 private: |
| 65 enum UIState { | 68 enum UIState { |
| 66 UI_STATE_NORMAL, // Normal UI (icon + label) | 69 UI_STATE_NORMAL, // Normal UI (icon + label) |
| 67 UI_STATE_DRAGGING, // Dragging UI (scaled icon only) | 70 UI_STATE_DRAGGING, // Dragging UI (scaled icon only) |
| 68 UI_STATE_DROPPING_IN_FOLDER, // Folder dropping preview UI | 71 UI_STATE_DROPPING_IN_FOLDER, // Folder dropping preview UI |
| 69 }; | 72 }; |
| 70 | 73 |
| 71 // Get icon from |item_| and schedule background processing. | 74 // Get icon from |item_| and schedule background processing. |
| 72 void UpdateIcon(); | 75 void UpdateIcon(); |
| 73 | 76 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 136 |
| 134 // A timer to defer showing drag UI when mouse is pressed. | 137 // A timer to defer showing drag UI when mouse is pressed. |
| 135 base::OneShotTimer<AppListItemView> mouse_drag_timer_; | 138 base::OneShotTimer<AppListItemView> mouse_drag_timer_; |
| 136 | 139 |
| 137 DISALLOW_COPY_AND_ASSIGN(AppListItemView); | 140 DISALLOW_COPY_AND_ASSIGN(AppListItemView); |
| 138 }; | 141 }; |
| 139 | 142 |
| 140 } // namespace app_list | 143 } // namespace app_list |
| 141 | 144 |
| 142 #endif // UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_ | 145 #endif // UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_ |
| OLD | NEW |