| 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 #include <Carbon/Carbon.h> | 7 #include <Carbon/Carbon.h> |
| 8 | 8 |
| 9 #include "base/mac/scoped_cftyperef.h" | 9 #include "base/mac/scoped_cftyperef.h" |
| 10 #import "base/mac/sdk_forward_declarations.h" | 10 #import "base/mac/sdk_forward_declarations.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 - (NSArray*)dropTargetsForController:(TabWindowController*)dragController; | 33 - (NSArray*)dropTargetsForController:(TabWindowController*)dragController; |
| 34 - (void)setWindowBackgroundVisibility:(BOOL)shouldBeVisible; | 34 - (void)setWindowBackgroundVisibility:(BOOL)shouldBeVisible; |
| 35 - (void)endDrag:(NSEvent*)event; | 35 - (void)endDrag:(NSEvent*)event; |
| 36 - (void)continueDrag:(NSEvent*)event; | 36 - (void)continueDrag:(NSEvent*)event; |
| 37 @end | 37 @end |
| 38 | 38 |
| 39 //////////////////////////////////////////////////////////////////////////////// | 39 //////////////////////////////////////////////////////////////////////////////// |
| 40 | 40 |
| 41 @implementation TabStripDragController | 41 @implementation TabStripDragController |
| 42 | 42 |
| 43 @synthesize draggedTab = draggedTab_; |
| 44 |
| 43 - (id)initWithTabStripController:(TabStripController*)controller { | 45 - (id)initWithTabStripController:(TabStripController*)controller { |
| 44 if ((self = [super init])) { | 46 if ((self = [super init])) { |
| 45 tabStrip_ = controller; | 47 tabStrip_ = controller; |
| 46 } | 48 } |
| 47 return self; | 49 return self; |
| 48 } | 50 } |
| 49 | 51 |
| 50 - (void)dealloc { | 52 - (void)dealloc { |
| 51 [NSObject cancelPreviousPerformRequestsWithTarget:self]; | 53 [NSObject cancelPreviousPerformRequestsWithTarget:self]; |
| 52 [super dealloc]; | 54 [super dealloc]; |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 [[targetController_ window] makeMainWindow]; | 500 [[targetController_ window] makeMainWindow]; |
| 499 } else { | 501 } else { |
| 500 [dragWindow_ setAlphaValue:0.5]; | 502 [dragWindow_ setAlphaValue:0.5]; |
| 501 [[draggedController_ overlayWindow] setHasShadow:NO]; | 503 [[draggedController_ overlayWindow] setHasShadow:NO]; |
| 502 [[draggedController_ window] makeMainWindow]; | 504 [[draggedController_ window] makeMainWindow]; |
| 503 } | 505 } |
| 504 chromeIsVisible_ = shouldBeVisible; | 506 chromeIsVisible_ = shouldBeVisible; |
| 505 } | 507 } |
| 506 | 508 |
| 507 @end | 509 @end |
| OLD | NEW |