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

Side by Side Diff: chrome/browser/cocoa/url_drop_target.mm

Issue 2730015: Mac/clang: Uncontentious fixes. (Closed)
Patch Set: '' Created 10 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
OLDNEW
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/url_drop_target.h" 5 #import "chrome/browser/cocoa/url_drop_target.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "third_party/mozilla/NSPasteboard+Utils.h" 8 #import "third_party/mozilla/NSPasteboard+Utils.h"
9 9
10 @interface URLDropTargetHandler(Private) 10 @interface URLDropTargetHandler(Private)
11 11
12 // Gets the appropriate drag operation given the |NSDraggingInfo|. 12 // Gets the appropriate drag operation given the |NSDraggingInfo|.
13 - (NSDragOperation)getDragOperation:(id<NSDraggingInfo>)sender; 13 - (NSDragOperation)getDragOperation:(id<NSDraggingInfo>)sender;
14 14
15 // Tell the window controller to hide the drop indicator. 15 // Tell the window controller to hide the drop indicator.
16 - (void)hideIndicator; 16 - (void)hideIndicator;
17 17
18 @end // @interface URLDropTargetHandler(Private) 18 @end // @interface URLDropTargetHandler(Private)
19 19
20 @implementation URLDropTargetHandler 20 @implementation URLDropTargetHandler
21 21
22 - (id)initWithView:(NSView*)view { 22 - (id)initWithView:(NSView<URLDropTarget>*)view {
23 if ((self = [super init])) { 23 if ((self = [super init])) {
24 view_ = view; 24 view_ = view;
25 [view_ registerForDraggedTypes: 25 [view_ registerForDraggedTypes:
26 [NSArray arrayWithObjects:kWebURLsWithTitlesPboardType, 26 [NSArray arrayWithObjects:kWebURLsWithTitlesPboardType,
27 NSURLPboardType, 27 NSURLPboardType,
28 NSStringPboardType, 28 NSStringPboardType,
29 NSFilenamesPboardType, 29 NSFilenamesPboardType,
30 nil]]; 30 nil]];
31 } 31 }
32 return self; 32 return self;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 - (NSDragOperation)getDragOperation:(id<NSDraggingInfo>)sender { 83 - (NSDragOperation)getDragOperation:(id<NSDraggingInfo>)sender {
84 // Only allow the copy operation. 84 // Only allow the copy operation.
85 return [sender draggingSourceOperationMask] & NSDragOperationCopy; 85 return [sender draggingSourceOperationMask] & NSDragOperationCopy;
86 } 86 }
87 87
88 - (void)hideIndicator { 88 - (void)hideIndicator {
89 [[view_ urlDropController] hideDropURLsIndicatorInView:view_]; 89 [[view_ urlDropController] hideDropURLsIndicatorInView:view_];
90 } 90 }
91 91
92 @end // @implementation URLDropTargetHandler(Private) 92 @end // @implementation URLDropTargetHandler(Private)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698