| 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 #import "chrome/browser/ui/cocoa/draggable_button.h" | 5 #import "chrome/browser/ui/cocoa/draggable_button.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 @implementation DraggableButton | 9 @implementation DraggableButton |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 [[DraggableButtonImpl alloc] initWithButton:self]); | 22 [[DraggableButtonImpl alloc] initWithButton:self]); |
| 23 } | 23 } |
| 24 return self; | 24 return self; |
| 25 } | 25 } |
| 26 | 26 |
| 27 - (DraggableButtonImpl*)draggableButton { | 27 - (DraggableButtonImpl*)draggableButton { |
| 28 return draggableButtonImpl_.get(); | 28 return draggableButtonImpl_.get(); |
| 29 } | 29 } |
| 30 | 30 |
| 31 - (void)mouseUp:(NSEvent*)theEvent { | 31 - (void)mouseUp:(NSEvent*)theEvent { |
| 32 if ([draggableButtonImpl_ mouseUp:theEvent] == kDraggableButtonMixinCallSuper) | 32 if ([draggableButtonImpl_ mouseUpImpl:theEvent] == |
| 33 kDraggableButtonMixinCallSuper) { |
| 33 [super mouseUp:theEvent]; | 34 [super mouseUp:theEvent]; |
| 35 } |
| 34 } | 36 } |
| 35 | 37 |
| 36 - (void)mouseDown:(NSEvent*)theEvent { | 38 - (void)mouseDown:(NSEvent*)theEvent { |
| 37 if ([draggableButtonImpl_ mouseDown:theEvent] == | 39 if ([draggableButtonImpl_ mouseDownImpl:theEvent] == |
| 38 kDraggableButtonMixinCallSuper) { | 40 kDraggableButtonMixinCallSuper) { |
| 39 [super mouseDown:theEvent]; | 41 [super mouseDown:theEvent]; |
| 40 } | 42 } |
| 41 } | 43 } |
| 42 | 44 |
| 43 - (void)beginDrag:(NSEvent*)dragEvent { | 45 - (void)beginDrag:(NSEvent*)dragEvent { |
| 44 // Must be overridden by subclasses. | 46 // Must be overridden by subclasses. |
| 45 NOTREACHED(); | 47 NOTREACHED(); |
| 46 } | 48 } |
| 47 | 49 |
| 48 @end // @interface DraggableButton | 50 @end // @interface DraggableButton |
| OLD | NEW |