| OLD | NEW |
| 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 Loading... |
| 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? | |
| 39 BOOL draggingWithinTabStrip_; // Did drag stay in the current tab strip? | 38 BOOL draggingWithinTabStrip_; // Did drag stay in the current tab strip? |
| 40 BOOL chromeIsVisible_; | 39 BOOL chromeIsVisible_; |
| 41 | 40 |
| 42 NSTimeInterval tearTime_; // Time since tear happened | 41 NSTimeInterval tearTime_; // Time since tear happened |
| 43 NSPoint tearOrigin_; // Origin of the tear rect | 42 NSPoint tearOrigin_; // Origin of the tear rect |
| 44 NSPoint dragOrigin_; // Origin point of the drag | 43 NSPoint dragOrigin_; // Origin point of the drag |
| 45 | 44 |
| 46 TabWindowController* sourceController_; // weak. controller starting the drag | 45 TabWindowController* sourceController_; // weak. controller starting the drag |
| 47 NSWindow* sourceWindow_; // Weak. The window starting the drag. | 46 NSWindow* sourceWindow_; // Weak. The window starting the drag. |
| 48 NSRect sourceWindowFrame_; | 47 NSRect sourceWindowFrame_; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 63 @property(readonly) TabController* draggedTab; | 62 @property(readonly) TabController* draggedTab; |
| 64 | 63 |
| 65 // Designated initializer. | 64 // Designated initializer. |
| 66 - (id)initWithTabStripController:(TabStripController*)controller; | 65 - (id)initWithTabStripController:(TabStripController*)controller; |
| 67 | 66 |
| 68 // TabDraggingEventTarget methods are also implemented. | 67 // TabDraggingEventTarget methods are also implemented. |
| 69 | 68 |
| 70 @end | 69 @end |
| 71 | 70 |
| 72 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_DRAG_CONTROLLER_H_ | 71 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_DRAG_CONTROLLER_H_ |
| OLD | NEW |