| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> | 
| 6 | 6 | 
| 7 #include "base/file_path.h" | 7 #include "base/file_path.h" | 
| 8 #include "base/memory/scoped_nsobject.h" | 8 #include "base/memory/scoped_nsobject.h" | 
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" | 
| 10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" | 
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 51 // contentsView and with the given dropData and pboard). Fill the pasteboard | 51 // contentsView and with the given dropData and pboard). Fill the pasteboard | 
| 52 // with data types appropriate for dropData. | 52 // with data types appropriate for dropData. | 
| 53 - (id)initWithContents:(WebContentsImpl*)contents | 53 - (id)initWithContents:(WebContentsImpl*)contents | 
| 54                   view:(NSView*)contentsView | 54                   view:(NSView*)contentsView | 
| 55               dropData:(const WebDropData*)dropData | 55               dropData:(const WebDropData*)dropData | 
| 56                  image:(NSImage*)image | 56                  image:(NSImage*)image | 
| 57                 offset:(NSPoint)offset | 57                 offset:(NSPoint)offset | 
| 58             pasteboard:(NSPasteboard*)pboard | 58             pasteboard:(NSPasteboard*)pboard | 
| 59      dragOperationMask:(NSDragOperation)dragOperationMask; | 59      dragOperationMask:(NSDragOperation)dragOperationMask; | 
| 60 | 60 | 
|  | 61 // Call when the web contents is gone. | 
|  | 62 - (void)clearWebContentsView; | 
|  | 63 | 
| 61 // Returns a mask of the allowed drag operations. | 64 // Returns a mask of the allowed drag operations. | 
| 62 - (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal; | 65 - (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal; | 
| 63 | 66 | 
| 64 // Call when asked to do a lazy write to the pasteboard; hook up to | 67 // Call when asked to do a lazy write to the pasteboard; hook up to | 
| 65 // -pasteboard:provideDataForType: (on the contentsView). | 68 // -pasteboard:provideDataForType: (on the contentsView). | 
| 66 - (void)lazyWriteToPasteboard:(NSPasteboard*)pboard | 69 - (void)lazyWriteToPasteboard:(NSPasteboard*)pboard | 
| 67                       forType:(NSString*)type; | 70                       forType:(NSString*)type; | 
| 68 | 71 | 
| 69 // Start the drag (on the originally provided contentsView); can do this right | 72 // Start the drag (on the originally provided contentsView); can do this right | 
| 70 // after -initWithContentsView:.... | 73 // after -initWithContentsView:.... | 
| 71 - (void)startDrag; | 74 - (void)startDrag; | 
| 72 | 75 | 
| 73 // End the drag and clear the pasteboard; hook up to | 76 // End the drag and clear the pasteboard; hook up to | 
| 74 // -draggedImage:endedAt:operation:. | 77 // -draggedImage:endedAt:operation:. | 
| 75 - (void)endDragAt:(NSPoint)screenPoint | 78 - (void)endDragAt:(NSPoint)screenPoint | 
| 76         operation:(NSDragOperation)operation; | 79         operation:(NSDragOperation)operation; | 
| 77 | 80 | 
| 78 // Drag moved; hook up to -draggedImage:movedTo:. | 81 // Drag moved; hook up to -draggedImage:movedTo:. | 
| 79 - (void)moveDragTo:(NSPoint)screenPoint; | 82 - (void)moveDragTo:(NSPoint)screenPoint; | 
| 80 | 83 | 
| 81 // Call to drag a promised file to the given path (should be called before | 84 // Call to drag a promised file to the given path (should be called before | 
| 82 // -endDragAt:...); hook up to -namesOfPromisedFilesDroppedAtDestination:. | 85 // -endDragAt:...); hook up to -namesOfPromisedFilesDroppedAtDestination:. | 
| 83 // Returns the file name (not including path) of the file deposited (or which | 86 // Returns the file name (not including path) of the file deposited (or which | 
| 84 // will be deposited). | 87 // will be deposited). | 
| 85 - (NSString*)dragPromisedFileTo:(NSString*)path; | 88 - (NSString*)dragPromisedFileTo:(NSString*)path; | 
| 86 | 89 | 
| 87 @end | 90 @end | 
| OLD | NEW | 
|---|