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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 TabWindowController* sourceController_; // weak. controller starting the drag | 48 TabWindowController* sourceController_; // weak. controller starting the drag |
49 NSWindow* sourceWindow_; // Weak. The window starting the drag. | 49 NSWindow* sourceWindow_; // Weak. The window starting the drag. |
50 NSRect sourceWindowFrame_; | 50 NSRect sourceWindowFrame_; |
51 NSRect sourceTabFrame_; | 51 NSRect sourceTabFrame_; |
52 | 52 |
53 TabController* draggedTab_; // Weak. The tab controller being dragged. | 53 TabController* draggedTab_; // Weak. The tab controller being dragged. |
54 | 54 |
55 TabWindowController* draggedController_; // Weak. Controller being dragged. | 55 TabWindowController* draggedController_; // Weak. Controller being dragged. |
56 NSWindow* dragWindow_; // Weak. The window being dragged | 56 NSWindow* dragWindow_; // Weak. The window being dragged |
57 NSWindow* dragOverlay_; // Weak. The overlay being dragged | 57 NSWindow* dragOverlay_; // Weak. The overlay being dragged |
58 // Cache workspace IDs per-drag because computing them on 10.5 with | |
59 // CGWindowListCreateDescriptionFromArray is expensive. | |
60 // resetDragControllers clears this cache. | |
61 // | |
62 // TODO(davidben): When 10.5 becomes unsupported, remove this. | |
63 std::map<CGWindowID, int> workspaceIDCache_; | |
64 | 58 |
65 TabWindowController* targetController_; // weak. Controller being targeted | 59 TabWindowController* targetController_; // weak. Controller being targeted |
66 } | 60 } |
67 | 61 |
68 // Designated initializer. | 62 // Designated initializer. |
69 - (id)initWithTabStripController:(TabStripController*)controller; | 63 - (id)initWithTabStripController:(TabStripController*)controller; |
70 | 64 |
71 // TabDraggingEventTarget methods are also implemented. | 65 // TabDraggingEventTarget methods are also implemented. |
72 | 66 |
73 @end | 67 @end |
74 | 68 |
75 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_DRAG_CONTROLLER_H_ | 69 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_DRAG_CONTROLLER_H_ |
OLD | NEW |