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

Side by Side Diff: chrome/browser/ui/views/tabs/tab_drag_controller.h

Issue 180983002: Avoids releasing capture prematurily when dragging tabs from one to another browser window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Uses Aura mouse capture and release code path on Linux Created 6 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab_drag_controller.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 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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 498
499 // The screen that this drag is associated with. Cached, because other UI 499 // The screen that this drag is associated with. Cached, because other UI
500 // elements are NULLd at various points during the lifetime of this object. 500 // elements are NULLd at various points during the lifetime of this object.
501 gfx::Screen* screen_; 501 gfx::Screen* screen_;
502 502
503 // The desktop type that this drag is associated with. Cached, because other 503 // The desktop type that this drag is associated with. Cached, because other
504 // UI elements are NULLd at various points during the lifetime of this 504 // UI elements are NULLd at various points during the lifetime of this
505 // object. 505 // object.
506 chrome::HostDesktopType host_desktop_type_; 506 chrome::HostDesktopType host_desktop_type_;
507 507
508 // Aura mouse capture and release is used on Ash platforms as well as on
509 // Linux to ensure that pointer grab is not released prematurely.
510 bool use_aura_capture_policy_;
511
508 // The position of the mouse (in screen coordinates) at the start of the drag 512 // The position of the mouse (in screen coordinates) at the start of the drag
509 // operation. This is used to calculate minimum elasticity before a 513 // operation. This is used to calculate minimum elasticity before a
510 // DraggedTabView is constructed. 514 // DraggedTabView is constructed.
511 gfx::Point start_point_in_screen_; 515 gfx::Point start_point_in_screen_;
512 516
513 // This is the offset of the mouse from the top left of the first Tab where 517 // This is the offset of the mouse from the top left of the first Tab where
514 // dragging began. This is used to ensure that the dragged view is always 518 // dragging began. This is used to ensure that the dragged view is always
515 // positioned at the correct location during the drag, and to ensure that the 519 // positioned at the correct location during the drag, and to ensure that the
516 // detached window is created at the right location. 520 // detached window is created at the right location.
517 gfx::Point mouse_offset_; 521 gfx::Point mouse_offset_;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 // See comment around use for more details. 637 // See comment around use for more details.
634 int attach_x_; 638 int attach_x_;
635 int attach_index_; 639 int attach_index_;
636 640
637 base::WeakPtrFactory<TabDragController> weak_factory_; 641 base::WeakPtrFactory<TabDragController> weak_factory_;
638 642
639 DISALLOW_COPY_AND_ASSIGN(TabDragController); 643 DISALLOW_COPY_AND_ASSIGN(TabDragController);
640 }; 644 };
641 645
642 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_ 646 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab_drag_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698