| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/cocoa/tab_strip_view.h" | 5 #import "chrome/browser/cocoa/tab_strip_view.h" |
| 6 | 6 |
| 7 #import "chrome/browser/cocoa/browser_window_controller.h" |
| 8 #import "chrome/browser/cocoa/tab_strip_controller.h" |
| 7 #include "base/logging.h" | 9 #include "base/logging.h" |
| 8 | 10 |
| 9 @implementation TabStripView | 11 @implementation TabStripView |
| 10 | 12 |
| 11 @synthesize newTabButton = newTabButton_; | 13 @synthesize newTabButton = newTabButton_; |
| 12 @synthesize dropArrowShown = dropArrowShown_; | 14 @synthesize dropArrowShown = dropArrowShown_; |
| 13 @synthesize dropArrowPosition = dropArrowPosition_; | 15 @synthesize dropArrowPosition = dropArrowPosition_; |
| 14 | 16 |
| 15 - (id)initWithFrame:(NSRect)frame { | 17 - (id)initWithFrame:(NSRect)frame { |
| 16 self = [super initWithFrame:frame]; | 18 self = [super initWithFrame:frame]; |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 performSelector:@selector(_shouldMiniaturizeOnDoubleClick)]) | 131 performSelector:@selector(_shouldMiniaturizeOnDoubleClick)]) |
| 130 [[self window] performMiniaturize:self]; | 132 [[self window] performMiniaturize:self]; |
| 131 } else { | 133 } else { |
| 132 [super mouseUp:event]; | 134 [super mouseUp:event]; |
| 133 } | 135 } |
| 134 | 136 |
| 135 // If clickCount is 0, the drag threshold was passed. | 137 // If clickCount is 0, the drag threshold was passed. |
| 136 lastMouseUp_ = (clickCount == 1) ? timestamp : -1000.0; | 138 lastMouseUp_ = (clickCount == 1) ? timestamp : -1000.0; |
| 137 } | 139 } |
| 138 | 140 |
| 139 // Required by |URLDropTargetHandler|. | 141 // (URLDropTarget protocol) |
| 142 - (id<URLDropTargetController>)urlDropController { |
| 143 BrowserWindowController* windowController = [[self window] windowController]; |
| 144 DCHECK([windowController isKindOfClass:[BrowserWindowController class]]); |
| 145 return [windowController tabStripController]; |
| 146 } |
| 147 |
| 148 // (URLDropTarget protocol) |
| 140 - (NSDragOperation)draggingEntered:(id<NSDraggingInfo>)sender { | 149 - (NSDragOperation)draggingEntered:(id<NSDraggingInfo>)sender { |
| 141 return [dropHandler_ draggingEntered:sender]; | 150 return [dropHandler_ draggingEntered:sender]; |
| 142 } | 151 } |
| 143 | 152 |
| 144 // Required by |URLDropTargetHandler|. | 153 // (URLDropTarget protocol) |
| 145 - (NSDragOperation)draggingUpdated:(id<NSDraggingInfo>)sender { | 154 - (NSDragOperation)draggingUpdated:(id<NSDraggingInfo>)sender { |
| 146 return [dropHandler_ draggingUpdated:sender]; | 155 return [dropHandler_ draggingUpdated:sender]; |
| 147 } | 156 } |
| 148 | 157 |
| 149 // Required by |URLDropTargetHandler|. | 158 // (URLDropTarget protocol) |
| 150 - (void)draggingExited:(id<NSDraggingInfo>)sender { | 159 - (void)draggingExited:(id<NSDraggingInfo>)sender { |
| 151 return [dropHandler_ draggingExited:sender]; | 160 return [dropHandler_ draggingExited:sender]; |
| 152 } | 161 } |
| 153 | 162 |
| 154 // Required by |URLDropTargetHandler|. | 163 // (URLDropTarget protocol) |
| 155 - (BOOL)performDragOperation:(id<NSDraggingInfo>)sender { | 164 - (BOOL)performDragOperation:(id<NSDraggingInfo>)sender { |
| 156 return [dropHandler_ performDragOperation:sender]; | 165 return [dropHandler_ performDragOperation:sender]; |
| 157 } | 166 } |
| 158 | 167 |
| 159 @end | 168 @end |
| OLD | NEW |