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 CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 | 461 |
462 // The screen that this drag is associated with. Cached, because other UI | 462 // The screen that this drag is associated with. Cached, because other UI |
463 // elements are NULLd at various points during the lifetime of this object. | 463 // elements are NULLd at various points during the lifetime of this object. |
464 gfx::Screen* screen_; | 464 gfx::Screen* screen_; |
465 | 465 |
466 // The desktop type that this drag is associated with. Cached, because other | 466 // The desktop type that this drag is associated with. Cached, because other |
467 // UI elements are NULLd at various points during the lifetime of this | 467 // UI elements are NULLd at various points during the lifetime of this |
468 // object. | 468 // object. |
469 chrome::HostDesktopType host_desktop_type_; | 469 chrome::HostDesktopType host_desktop_type_; |
470 | 470 |
471 // Aura mouse capture and release is used on Ash platforms as well as on | 471 // Whether capture can be released during the drag. When false, capture should |
472 // Linux to ensure that pointer grab is not released prematurely. | 472 // not be released when transferring capture between widgets and when starting |
473 bool use_aura_capture_policy_; | 473 // the move loop. |
| 474 bool can_release_capture_; |
474 | 475 |
475 // The position of the mouse (in screen coordinates) at the start of the drag | 476 // The position of the mouse (in screen coordinates) at the start of the drag |
476 // operation. This is used to calculate minimum elasticity before a | 477 // operation. This is used to calculate minimum elasticity before a |
477 // DraggedTabView is constructed. | 478 // DraggedTabView is constructed. |
478 gfx::Point start_point_in_screen_; | 479 gfx::Point start_point_in_screen_; |
479 | 480 |
480 // This is the offset of the mouse from the top left of the first Tab where | 481 // This is the offset of the mouse from the top left of the first Tab where |
481 // dragging began. This is used to ensure that the dragged view is always | 482 // dragging began. This is used to ensure that the dragged view is always |
482 // positioned at the correct location during the drag, and to ensure that the | 483 // positioned at the correct location during the drag, and to ensure that the |
483 // detached window is created at the right location. | 484 // detached window is created at the right location. |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 int attach_index_; | 599 int attach_index_; |
599 | 600 |
600 scoped_ptr<ui::EventHandler> escape_tracker_; | 601 scoped_ptr<ui::EventHandler> escape_tracker_; |
601 | 602 |
602 base::WeakPtrFactory<TabDragController> weak_factory_; | 603 base::WeakPtrFactory<TabDragController> weak_factory_; |
603 | 604 |
604 DISALLOW_COPY_AND_ASSIGN(TabDragController); | 605 DISALLOW_COPY_AND_ASSIGN(TabDragController); |
605 }; | 606 }; |
606 | 607 |
607 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_ | 608 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_ |
OLD | NEW |