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 #import "chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.h" | 5 #import "chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.h" |
6 | 6 |
7 #import "base/mac/mac_util.h" | 7 #import "base/mac/mac_util.h" |
8 #include "base/mac/scoped_cftyperef.h" | 8 #include "base/mac/scoped_cftyperef.h" |
| 9 #import "base/mac/sdk_forward_declarations.h" |
9 #import "chrome/browser/ui/cocoa/tabs/tab_controller.h" | 10 #import "chrome/browser/ui/cocoa/tabs/tab_controller.h" |
10 #import "chrome/browser/ui/cocoa/tabs/tab_controller_target.h" | 11 #import "chrome/browser/ui/cocoa/tabs/tab_controller_target.h" |
11 #import "chrome/browser/ui/cocoa/tabs/tab_view.h" | 12 #import "chrome/browser/ui/cocoa/tabs/tab_view.h" |
12 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h" | 13 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h" |
13 | 14 |
14 // Replicate specific 10.7 SDK declarations for building with prior SDKs. | |
15 #if !defined(MAC_OS_X_VERSION_10_7) || \ | |
16 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 | |
17 | |
18 enum { | |
19 NSWindowAnimationBehaviorDefault = 0, | |
20 NSWindowAnimationBehaviorNone = 2, | |
21 NSWindowAnimationBehaviorDocumentWindow = 3, | |
22 NSWindowAnimationBehaviorUtilityWindow = 4, | |
23 NSWindowAnimationBehaviorAlertPanel = 5 | |
24 }; | |
25 typedef NSInteger NSWindowAnimationBehavior; | |
26 | |
27 @interface NSWindow (LionSDKDeclarations) | |
28 - (NSWindowAnimationBehavior)animationBehavior; | |
29 - (void)setAnimationBehavior:(NSWindowAnimationBehavior)newAnimationBehavior; | |
30 @end | |
31 | |
32 #endif // MAC_OS_X_VERSION_10_7 | |
33 | |
34 const CGFloat kTearDistance = 36.0; | 15 const CGFloat kTearDistance = 36.0; |
35 const NSTimeInterval kTearDuration = 0.333; | 16 const NSTimeInterval kTearDuration = 0.333; |
36 | 17 |
37 @interface TabStripDragController (Private) | 18 @interface TabStripDragController (Private) |
38 - (void)resetDragControllers; | 19 - (void)resetDragControllers; |
39 - (NSArray*)dropTargetsForController:(TabWindowController*)dragController; | 20 - (NSArray*)dropTargetsForController:(TabWindowController*)dragController; |
40 - (void)setWindowBackgroundVisibility:(BOOL)shouldBeVisible; | 21 - (void)setWindowBackgroundVisibility:(BOOL)shouldBeVisible; |
41 - (void)endDrag:(NSEvent*)event; | 22 - (void)endDrag:(NSEvent*)event; |
42 - (void)continueDrag:(NSEvent*)event; | 23 - (void)continueDrag:(NSEvent*)event; |
43 @end | 24 @end |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 [[targetController_ window] makeMainWindow]; | 469 [[targetController_ window] makeMainWindow]; |
489 } else { | 470 } else { |
490 [dragWindow_ setAlphaValue:0.5]; | 471 [dragWindow_ setAlphaValue:0.5]; |
491 [[draggedController_ overlayWindow] setHasShadow:NO]; | 472 [[draggedController_ overlayWindow] setHasShadow:NO]; |
492 [[draggedController_ window] makeMainWindow]; | 473 [[draggedController_ window] makeMainWindow]; |
493 } | 474 } |
494 chromeIsVisible_ = shouldBeVisible; | 475 chromeIsVisible_ = shouldBeVisible; |
495 } | 476 } |
496 | 477 |
497 @end | 478 @end |
OLD | NEW |