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

Side by Side Diff: chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.h

Issue 2541653002: Add a dead zone when dragging tabs horizontally on Mac (Closed)
Patch Set: Addressing review comments. Created 4 years 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_COCOA_TABS_TAB_STRIP_DRAG_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_DRAG_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_DRAG_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_DRAG_CONTROLLER_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <map> 9 #include <map>
10 10
(...skipping 17 matching lines...) Expand all
28 28
29 // This controller is owned by the TabStripController and is used to delegate 29 // This controller is owned by the TabStripController and is used to delegate
30 // all the logic for tab dragging from the TabView's events. 30 // all the logic for tab dragging from the TabView's events.
31 @interface TabStripDragController : NSObject<TabDraggingEventTarget> { 31 @interface TabStripDragController : NSObject<TabDraggingEventTarget> {
32 @private 32 @private
33 TabStripController* tabStrip_; // Weak; owns this. 33 TabStripController* tabStrip_; // Weak; owns this.
34 34
35 // These are released on mouseUp: 35 // These are released on mouseUp:
36 BOOL moveWindowOnDrag_; // Set if the only tab of a window is dragged. 36 BOOL moveWindowOnDrag_; // Set if the only tab of a window is dragged.
37 BOOL tabWasDragged_; // Has the tab been dragged? 37 BOOL tabWasDragged_; // Has the tab been dragged?
38 BOOL outOfTabHorizontalDeadZone_; // Moved out of its horizontal dead zone?
38 BOOL draggingWithinTabStrip_; // Did drag stay in the current tab strip? 39 BOOL draggingWithinTabStrip_; // Did drag stay in the current tab strip?
39 BOOL chromeIsVisible_; 40 BOOL chromeIsVisible_;
40 41
41 NSTimeInterval tearTime_; // Time since tear happened 42 NSTimeInterval tearTime_; // Time since tear happened
42 NSPoint tearOrigin_; // Origin of the tear rect 43 NSPoint tearOrigin_; // Origin of the tear rect
43 NSPoint dragOrigin_; // Origin point of the drag 44 NSPoint dragOrigin_; // Origin point of the drag
44 45
45 TabWindowController* sourceController_; // weak. controller starting the drag 46 TabWindowController* sourceController_; // weak. controller starting the drag
46 NSWindow* sourceWindow_; // Weak. The window starting the drag. 47 NSWindow* sourceWindow_; // Weak. The window starting the drag.
47 NSRect sourceWindowFrame_; 48 NSRect sourceWindowFrame_;
(...skipping 14 matching lines...) Expand all
62 @property(readonly) TabController* draggedTab; 63 @property(readonly) TabController* draggedTab;
63 64
64 // Designated initializer. 65 // Designated initializer.
65 - (id)initWithTabStripController:(TabStripController*)controller; 66 - (id)initWithTabStripController:(TabStripController*)controller;
66 67
67 // TabDraggingEventTarget methods are also implemented. 68 // TabDraggingEventTarget methods are also implemented.
68 69
69 @end 70 @end
70 71
71 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_DRAG_CONTROLLER_H_ 72 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_DRAG_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698