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

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

Issue 337055: Mac: implement drag-and-drop of URLs to tabs/tab strip. (Closed)
Patch Set: Give another line back. Created 11 years 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_COCOA_URL_DROP_TARGET_H_
6 #define CHROME_BROWSER_COCOA_URL_DROP_TARGET_H_
7
8 #import <Cocoa/Cocoa.h>
9
10 @interface URLDropTargetHandler : NSObject {
11 @private
12 NSView* view_; // weak
13 }
14
15 // Initialize the given view to accept drops of URLs; this requires the view's
16 // window's controller to implement the |URLDropTargetWindowController| protocol
17 // (below).
18 - (id)initWithView:(NSView*)view;
19
20 // The owner view should implement the following methods by calling the
21 // |URLDropTargetHandler|'s version, and leave the others to the default
22 // implementation provided by |NSView|/|NSWindow|.
23 - (NSDragOperation)draggingEntered:(id<NSDraggingInfo>)sender;
24 - (NSDragOperation)draggingUpdated:(id<NSDraggingInfo>)sender;
25 - (void)draggingExited:(id<NSDraggingInfo>)sender;
26 - (BOOL)performDragOperation:(id<NSDraggingInfo>)sender;
27
28 @end // @interface URLDropTargetHandler
29
30 @protocol URLDropTargetWindowController
31
32 // The given URLs (an |NSArray| of |NSString|s) were dropped at the given
33 // location (location in window base coordinates).
34 - (void)dropURLs:(NSArray*)urls at:(NSPoint)location;
35
36 // Dragging is in progress over the owner view (at the given location, in window
37 // base coordinates) and any indicator of location -- e.g., an arrow -- should
38 // be updated/shown.
39 - (void)indicateDropURLsAt:(NSPoint)location;
40
41 // Dragging is over, and any indicator should be hidden.
42 - (void)hideDropURLsIndicator;
43
44 @end // @protocol URLDropTargetWindowController
45
46 #endif // CHROME_BROWSER_COCOA_URL_DROP_TARGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698