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

Unified Diff: chrome/browser/cocoa/url_drop_target.h

Issue 501135: Revert 34998, more stabbing in the dark to find a perf regression - Mac: impl... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/cocoa/toolbar_controller.mm ('k') | chrome/browser/cocoa/url_drop_target.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/url_drop_target.h
===================================================================
--- chrome/browser/cocoa/url_drop_target.h (revision 35037)
+++ chrome/browser/cocoa/url_drop_target.h (working copy)
@@ -7,19 +7,15 @@
#import <Cocoa/Cocoa.h>
-@protocol URLDropTarget;
-@protocol URLDropTargetController;
-
-// Object which coordinates the dropping of URLs on a given view, sending data
-// and updates to a controller.
@interface URLDropTargetHandler : NSObject {
@private
- NSView<URLDropTarget>* view_; // weak
+ NSView* view_; // weak
}
-// Initialize the given view, which must implement the |URLDropTarget| (below),
-// to accept drops of URLs.
-- (id)initWithView:(NSView<URLDropTarget>*)view;
+// Initialize the given view to accept drops of URLs; this requires the view's
+// window's controller to implement the |URLDropTargetWindowController| protocol
+// (below).
+- (id)initWithView:(NSView*)view;
// The owner view should implement the following methods by calling the
// |URLDropTargetHandler|'s version, and leave the others to the default
@@ -31,37 +27,20 @@
@end // @interface URLDropTargetHandler
-// Protocol which views that are URL drop targets and use |URLDropTargetHandler|
-// must implement.
-@protocol URLDropTarget
+@protocol URLDropTargetWindowController
-// Returns the controller which handles the drop.
-- (id<URLDropTargetController>)urlDropController;
+// The given URLs (an |NSArray| of |NSString|s) were dropped at the given
+// location (location in window base coordinates).
+- (void)dropURLs:(NSArray*)urls at:(NSPoint)location;
-// The following, which come from |NSDraggingDestination|, must be implemented
-// by calling the |URLDropTargetHandler|'s implementations.
-- (NSDragOperation)draggingEntered:(id<NSDraggingInfo>)sender;
-- (NSDragOperation)draggingUpdated:(id<NSDraggingInfo>)sender;
-- (void)draggingExited:(id<NSDraggingInfo>)sender;
-- (BOOL)performDragOperation:(id<NSDraggingInfo>)sender;
+// Dragging is in progress over the owner view (at the given location, in window
+// base coordinates) and any indicator of location -- e.g., an arrow -- should
+// be updated/shown.
+- (void)indicateDropURLsAt:(NSPoint)location;
-@end // @protocol URLDropTarget
-
-// Protocol for the controller which handles the actual drop data/drop updates.
-@protocol URLDropTargetController
-
-// The given URLs (an |NSArray| of |NSString|s) were dropped in the given view
-// at the given point (in that view's coordinates).
-- (void)dropURLs:(NSArray*)urls inView:(NSView*)view at:(NSPoint)point;
-
-// Dragging is in progress over the owner view (at the given point, in view
-// coordinates) and any indicator of location -- e.g., an arrow -- should be
-// updated/shown.
-- (void)indicateDropURLsInView:(NSView*)view at:(NSPoint)point;
-
// Dragging is over, and any indicator should be hidden.
-- (void)hideDropURLsIndicatorInView:(NSView*)view;
+- (void)hideDropURLsIndicator;
-@end // @protocol URLDropTargetController
+@end // @protocol URLDropTargetWindowController
#endif // CHROME_BROWSER_COCOA_URL_DROP_TARGET_H_
« no previous file with comments | « chrome/browser/cocoa/toolbar_controller.mm ('k') | chrome/browser/cocoa/url_drop_target.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698