Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(710)

Side by Side Diff: chrome/browser/ui/cocoa/draggable_button.mm

Issue 17593006: mac: Update clients of scoped_nsobject.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: iwyu, scoped_nsprotocol Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 21 matching lines...) Expand all
32 if ([draggableButtonImpl_ mouseUpImpl:theEvent] == 32 if ([draggableButtonImpl_ mouseUpImpl:theEvent] ==
33 kDraggableButtonMixinCallSuper) { 33 kDraggableButtonMixinCallSuper) {
34 [super mouseUp:theEvent]; 34 [super mouseUp:theEvent];
35 } 35 }
36 } 36 }
37 37
38 - (void)mouseDown:(NSEvent*)theEvent { 38 - (void)mouseDown:(NSEvent*)theEvent {
39 // The impl spins an event loop to distinguish clicks from drags, 39 // The impl spins an event loop to distinguish clicks from drags,
40 // which could result in our destruction. Wire ourselves down for 40 // which could result in our destruction. Wire ourselves down for
41 // the duration. 41 // the duration.
42 scoped_nsobject<DraggableButton> keepAlive([self retain]); 42 base::scoped_nsobject<DraggableButton> keepAlive([self retain]);
43 43
44 if ([draggableButtonImpl_ mouseDownImpl:theEvent] == 44 if ([draggableButtonImpl_ mouseDownImpl:theEvent] ==
45 kDraggableButtonMixinCallSuper) { 45 kDraggableButtonMixinCallSuper) {
46 [super mouseDown:theEvent]; 46 [super mouseDown:theEvent];
47 } 47 }
48 } 48 }
49 49
50 - (void)beginDrag:(NSEvent*)dragEvent { 50 - (void)beginDrag:(NSEvent*)dragEvent {
51 // Must be overridden by subclasses. 51 // Must be overridden by subclasses.
52 NOTREACHED(); 52 NOTREACHED();
53 } 53 }
54 54
55 @end // @interface DraggableButton 55 @end // @interface DraggableButton
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698