Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: ui/app_list/views/app_list_item_view.h

Issue 136303008: Implement ui for re-parenting an item from an app list folder to another position or folder in the … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/app_list/views/app_list_folder_view.cc ('k') | ui/app_list/views/app_list_item_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
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. 64 // Returns the icon bounds relative to AppListItemView.
65 const gfx::Rect& GetIconBounds() const; 65 const gfx::Rect& GetIconBounds() const;
66 66
67 // Sets UI state to dragging state.
68 void SetDragUIState();
69
70 // Returns the icon bounds for the given |target_bounds| as
71 // the assuming bounds of this view.
72 gfx::Rect GetIconBoundsForTargetViewBounds(const gfx::Rect& target_bounds);
73
67 private: 74 private:
68 enum UIState { 75 enum UIState {
69 UI_STATE_NORMAL, // Normal UI (icon + label) 76 UI_STATE_NORMAL, // Normal UI (icon + label)
70 UI_STATE_DRAGGING, // Dragging UI (scaled icon only) 77 UI_STATE_DRAGGING, // Dragging UI (scaled icon only)
71 UI_STATE_DROPPING_IN_FOLDER, // Folder dropping preview UI 78 UI_STATE_DROPPING_IN_FOLDER, // Folder dropping preview UI
72 }; 79 };
73 80
74 // Get icon from |item_| and schedule background processing. 81 // Get icon from |item_| and schedule background processing.
75 void UpdateIcon(); 82 void UpdateIcon();
76 83
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 143
137 // A timer to defer showing drag UI when mouse is pressed. 144 // A timer to defer showing drag UI when mouse is pressed.
138 base::OneShotTimer<AppListItemView> mouse_drag_timer_; 145 base::OneShotTimer<AppListItemView> mouse_drag_timer_;
139 146
140 DISALLOW_COPY_AND_ASSIGN(AppListItemView); 147 DISALLOW_COPY_AND_ASSIGN(AppListItemView);
141 }; 148 };
142 149
143 } // namespace app_list 150 } // namespace app_list
144 151
145 #endif // UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_ 152 #endif // UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_
OLDNEW
« no previous file with comments | « ui/app_list/views/app_list_folder_view.cc ('k') | ui/app_list/views/app_list_item_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698