From aff2a76dbe837879c0748ff2126a336262cf73bf Mon Sep 17 00:00:00 2001 From: amaitland Date: Mon, 8 Dec 2014 22:15:16 +1000 Subject: [PATCH] Implement CefDragData ResetFileContents --- CefSharp.Core/Internals/CefDragDataWrapper.h | 5 +++++ CefSharp/IDragData.cs | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/CefSharp.Core/Internals/CefDragDataWrapper.h b/CefSharp.Core/Internals/CefDragDataWrapper.h index 1b22a555f..663d95fa0 100644 --- a/CefSharp.Core/Internals/CefDragDataWrapper.h +++ b/CefSharp.Core/Internals/CefDragDataWrapper.h @@ -131,6 +131,11 @@ namespace CefSharp { _wrappedDragData->AddFile(StringUtils::ToNative(path), StringUtils::ToNative(displayName)); } + + virtual void ResetFileContents() + { + _wrappedDragData->ResetFileContents(); + } }; } } diff --git a/CefSharp/IDragData.cs b/CefSharp/IDragData.cs index 7436074a3..2069e4cb1 100644 --- a/CefSharp/IDragData.cs +++ b/CefSharp/IDragData.cs @@ -70,5 +70,12 @@ namespace CefSharp /// File Path /// Optional Display Name void AddFile(string path, string displayName = null); + + /// + /// Reset the file contents. You should do this before calling + /// CefBrowserHost::DragTargetDragEnter as the web view does not allow us to + /// drag in this kind of data. + /// + void ResetFileContents(); } } \ No newline at end of file