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

Unified Diff: content/browser/web_contents/web_contents_view_mac.mm

Issue 23775005: Go back to the old method of doing file drop promises. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more detail in brokenness Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/web_contents/web_drag_source_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_view_mac.mm
diff --git a/content/browser/web_contents/web_contents_view_mac.mm b/content/browser/web_contents/web_contents_view_mac.mm
index 6a9459d3e95c487ad9d53e0186ca247c2505dc1f..d1ab628b33e0117d58a606267a604ac5f9661bda 100644
--- a/content/browser/web_contents/web_contents_view_mac.mm
+++ b/content/browser/web_contents/web_contents_view_mac.mm
@@ -512,6 +512,18 @@ void WebContentsViewMac::CloseTab() {
[dragSource_ moveDragTo:screenPoint];
}
+// Called when a file drag is dropped and the promised files need to be written.
+- (NSArray*)namesOfPromisedFilesDroppedAtDestination:(NSURL*)dropDest {
+ if (![dropDest isFileURL])
+ return nil;
+
+ NSString* fileName = [dragSource_ dragPromisedFileTo:[dropDest path]];
+ if (!fileName)
+ return nil;
+
+ return @[ fileName ];
+}
+
// NSDraggingDestination methods
- (NSDragOperation)draggingEntered:(id<NSDraggingInfo>)sender {
« no previous file with comments | « no previous file | content/browser/web_contents/web_drag_source_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698