| 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 ASH_SHELF_SHELF_VIEW_H_ | 5 #ifndef ASH_SHELF_SHELF_VIEW_H_ |
| 6 #define ASH_SHELF_SHELF_VIEW_H_ | 6 #define ASH_SHELF_SHELF_VIEW_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 | 439 |
| 440 // The cursor offset to the middle of the dragged item. | 440 // The cursor offset to the middle of the dragged item. |
| 441 gfx::Vector2d drag_image_offset_; | 441 gfx::Vector2d drag_image_offset_; |
| 442 | 442 |
| 443 // The view which gets replaced by our drag icon proxy. | 443 // The view which gets replaced by our drag icon proxy. |
| 444 views::View* drag_replaced_view_; | 444 views::View* drag_replaced_view_; |
| 445 | 445 |
| 446 // True when the icon was dragged off the shelf. | 446 // True when the icon was dragged off the shelf. |
| 447 bool dragged_off_shelf_; | 447 bool dragged_off_shelf_; |
| 448 | 448 |
| 449 // True when an item is dragged from one shelf to another (eg. overflow). |
| 450 bool dragged_to_another_shelf_; |
| 451 |
| 449 // The rip off view when a snap back operation is underway. | 452 // The rip off view when a snap back operation is underway. |
| 450 views::View* snap_back_from_rip_off_view_; | 453 views::View* snap_back_from_rip_off_view_; |
| 451 | 454 |
| 452 // True when this ShelfView is used for Overflow Bubble. | 455 // True when this ShelfView is used for Overflow Bubble. |
| 453 bool overflow_mode_; | 456 bool overflow_mode_; |
| 454 | 457 |
| 455 // Holds a pointer to main ShelfView when a ShelfView is in overflow mode. | 458 // Holds a pointer to main ShelfView when a ShelfView is in overflow mode. |
| 456 ShelfView* main_shelf_; | 459 ShelfView* main_shelf_; |
| 457 | 460 |
| 458 // True when ripped item from overflow bubble is entered into Shelf. | |
| 459 bool dragged_off_from_overflow_to_shelf_; | |
| 460 | |
| 461 // True if the event is a repost event from a event which has just closed the | 461 // True if the event is a repost event from a event which has just closed the |
| 462 // menu of the same shelf item. | 462 // menu of the same shelf item. |
| 463 bool is_repost_event_on_same_item_; | 463 bool is_repost_event_on_same_item_; |
| 464 | 464 |
| 465 // Record the index for the last pressed shelf item. This variable is used to | 465 // Record the index for the last pressed shelf item. This variable is used to |
| 466 // check if a repost event occurs on the same shelf item as previous one. If | 466 // check if a repost event occurs on the same shelf item as previous one. If |
| 467 // so, the repost event should be ignored. | 467 // so, the repost event should be ignored. |
| 468 int last_pressed_index_; | 468 int last_pressed_index_; |
| 469 | 469 |
| 470 // Tracks UMA metrics based on shelf button press actions. | 470 // Tracks UMA metrics based on shelf button press actions. |
| 471 ShelfButtonPressedMetricTracker shelf_button_pressed_metric_tracker_; | 471 ShelfButtonPressedMetricTracker shelf_button_pressed_metric_tracker_; |
| 472 | 472 |
| 473 base::WeakPtrFactory<ShelfView> weak_factory_; | 473 base::WeakPtrFactory<ShelfView> weak_factory_; |
| 474 | 474 |
| 475 DISALLOW_COPY_AND_ASSIGN(ShelfView); | 475 DISALLOW_COPY_AND_ASSIGN(ShelfView); |
| 476 }; | 476 }; |
| 477 | 477 |
| 478 } // namespace ash | 478 } // namespace ash |
| 479 | 479 |
| 480 #endif // ASH_SHELF_SHELF_VIEW_H_ | 480 #endif // ASH_SHELF_SHELF_VIEW_H_ |
| OLD | NEW |