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_APPS_GRID_VIEW_H_ | 5 #ifndef UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_ |
6 #define UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_ | 6 #define UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
383 // If |hide| is set the view will get hidden, otherwise it gets shown. | 383 // If |hide| is set the view will get hidden, otherwise it gets shown. |
384 void SetViewHidden(views::View* view, bool hide, bool immediate); | 384 void SetViewHidden(views::View* view, bool hide, bool immediate); |
385 | 385 |
386 // Whether the folder drag-and-drop UI should be enabled. | 386 // Whether the folder drag-and-drop UI should be enabled. |
387 bool EnableFolderDragDropUI(); | 387 bool EnableFolderDragDropUI(); |
388 | 388 |
389 // Whether target specified by |drap_target| can accept more items to be | 389 // Whether target specified by |drap_target| can accept more items to be |
390 // dropped into it. | 390 // dropped into it. |
391 bool CanDropIntoTarget(const Index& drop_target); | 391 bool CanDropIntoTarget(const Index& drop_target); |
392 | 392 |
393 // Returns the visual index of the nearest tile in which |drag_view_| enters | 393 // Calculates the visual index of the nearest tile for which |drag_view_| |
394 // either its re-ordering or folder dropping circle. | 394 // enters either its re-ordering or folder dropping circle. |
395 Index GetNearestTileForDragView(); | 395 void CalculateNearestTileForDragView(); |
396 | 396 |
397 // Calculates |nearest_tile| in which |vertex| of the |drag_view| is | 397 // Calculates |nearest_tile| in which |vertex| of the |drag_view| is |
398 // enclosed. | 398 // enclosed. |
399 // *|nearest_tile| and *|d_min| will be updated based on the calculation. | 399 // *|nearest_tile| and *|d_min| will be updated based on the calculation. |
400 // *|d_min| is the distance between |nearest_tile| and |drag_view_|. | 400 // *|d_min| is the distance between |nearest_tile| and |drag_view_|. |
401 void CalculateNearestTileForVertex( | 401 void CalculateNearestTileForVertex( |
402 const gfx::Point& vertex, Index* nearest_tile, int* d_min); | 402 const gfx::Point& vertex, Index* nearest_tile, int* d_min); |
403 | 403 |
404 // Returns the bounds of the tile in which |point| is enclosed if there | 404 // Returns the bounds of the tile in which |point| is enclosed if there |
405 // is a valid item sits on the tile. | 405 // is a valid item sits on the tile. |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
506 #if defined(OS_WIN) | 506 #if defined(OS_WIN) |
507 // Created when a drag is started (ie: drag exceeds the drag threshold), but | 507 // Created when a drag is started (ie: drag exceeds the drag threshold), but |
508 // not Run() until supplied with a shortcut path. | 508 // not Run() until supplied with a shortcut path. |
509 scoped_refptr<SynchronousDrag> synchronous_drag_; | 509 scoped_refptr<SynchronousDrag> synchronous_drag_; |
510 | 510 |
511 // Whether to use SynchronousDrag to support dropping to task bar etc. | 511 // Whether to use SynchronousDrag to support dropping to task bar etc. |
512 bool use_synchronous_drag_; | 512 bool use_synchronous_drag_; |
513 #endif | 513 #endif |
514 | 514 |
515 Pointer drag_pointer_; | 515 Pointer drag_pointer_; |
516 Index drop_target_; | 516 Index reorder_drop_target_; |
Matt Giuca
2014/09/11 03:35:39
Comments here.
In particular, say that reorder_dr
calamity
2014/09/11 07:05:17
Done.
| |
517 Index folder_drop_target_; | |
517 DropAttempt drop_attempt_; | 518 DropAttempt drop_attempt_; |
518 | 519 |
519 // Timer for re-ordering the |drop_target_| and |drag_view_|. | 520 // Timer for re-ordering the |drop_target_| and |drag_view_|. |
520 base::OneShotTimer<AppsGridView> reorder_timer_; | 521 base::OneShotTimer<AppsGridView> reorder_timer_; |
521 | 522 |
522 // Timer for dropping |drag_view_| into the folder containing | 523 // Timer for dropping |drag_view_| into the folder containing |
523 // the |drop_target_|. | 524 // the |drop_target_|. |
524 base::OneShotTimer<AppsGridView> folder_dropping_timer_; | 525 base::OneShotTimer<AppsGridView> folder_dropping_timer_; |
525 | 526 |
526 // Timer for dragging a folder item out of folder container ink bubble. | 527 // Timer for dragging a folder item out of folder container ink bubble. |
(...skipping 30 matching lines...) Expand all Loading... | |
557 | 558 |
558 // True if the drag_view_ item is a folder item being dragged for reparenting. | 559 // True if the drag_view_ item is a folder item being dragged for reparenting. |
559 bool dragging_for_reparent_item_; | 560 bool dragging_for_reparent_item_; |
560 | 561 |
561 DISALLOW_COPY_AND_ASSIGN(AppsGridView); | 562 DISALLOW_COPY_AND_ASSIGN(AppsGridView); |
562 }; | 563 }; |
563 | 564 |
564 } // namespace app_list | 565 } // namespace app_list |
565 | 566 |
566 #endif // UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_ | 567 #endif // UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_ |
OLD | NEW |