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

Unified Diff: ui/app_list/views/apps_grid_view.h

Issue 557673002: Split app list drop target into reorder and folder drop targets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fasdaj
Patch Set: address comments Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/app_list/views/apps_grid_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/apps_grid_view.h
diff --git a/ui/app_list/views/apps_grid_view.h b/ui/app_list/views/apps_grid_view.h
index f509284b54e61b51c504acf79ee89fda1b968f8c..f98843bd92d8f95f33abaaf5f35695544fea7341 100644
--- a/ui/app_list/views/apps_grid_view.h
+++ b/ui/app_list/views/apps_grid_view.h
@@ -288,14 +288,14 @@ class APP_LIST_EXPORT AppsGridView : public views::View,
void ExtractDragLocation(const ui::LocatedEvent& event,
gfx::Point* drag_point);
- // Calculates |drop_target_| based on |drag_point|. |drag_point| is in the
- // grid view's coordinates. When |use_page_button_hovering| is true and
- // |drag_point| is hovering on a page button, use the last slot on that page
- // as drop target.
+ // Calculates reorder and folder drop targets based on |drag_point|.
+ // |drag_point| is in the grid view's coordinates. When
+ // |use_page_button_hovering| is true and |drag_point| is hovering on a page
+ // button, use the last slot on that page as drop target.
void CalculateDropTarget(const gfx::Point& drag_point,
bool use_page_button_hovering);
- // Same as CalculateDropTarget, but with folder UI enabled. The |drop_target_|
+ // Same as CalculateDropTarget, but with folder UI enabled. The drop target
// can be either a target for re-ordering, or a target folder to move the
// dragged item into if |drag_view_| enters its re-ordering or folder
// dropping circle.
@@ -390,9 +390,9 @@ class APP_LIST_EXPORT AppsGridView : public views::View,
// dropped into it.
bool CanDropIntoTarget(const Index& drop_target);
- // Returns the visual index of the nearest tile in which |drag_view_| enters
- // either its re-ordering or folder dropping circle.
- Index GetNearestTileForDragView();
+ // Calculates the visual index of the nearest tile for which |drag_view_|
+ // enters either its re-ordering or folder dropping circle.
+ void CalculateNearestTileForDragView();
// Calculates |nearest_tile| in which |vertex| of the |drag_view| is
// enclosed.
@@ -513,7 +513,14 @@ class APP_LIST_EXPORT AppsGridView : public views::View,
#endif
Pointer drag_pointer_;
- Index drop_target_;
+
+ // The most recent reorder drop target.
+ Index reorder_drop_target_;
+
+ // The most recent folder drop target.
+ Index folder_drop_target_;
+
+ // The current action that ending a drag will perform.
DropAttempt drop_attempt_;
// Timer for re-ordering the |drop_target_| and |drag_view_|.
« no previous file with comments | « no previous file | ui/app_list/views/apps_grid_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698