Skip to content

Commit 23c9090

Browse files
mbragg12Michael Bragg
andauthored
Add in file paths data to DragData (#4649)
* Add in file paths data to DragData * Update of CefSharp.Core.Runtime.netcore.cs for adding DragData FilePaths and removal of AcceptLanguageList --------- Co-authored-by: Michael Bragg <[email protected]>
1 parent ad2213b commit 23c9090

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.netcore.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ public partial class BrowserSettings : CefSharp.IBrowserSettings
1414
{
1515
public BrowserSettings() { }
1616
public BrowserSettings(bool autoDispose) { }
17-
public virtual string AcceptLanguageList { get { throw null; } set { } }
1817
public virtual bool AutoDispose { get { throw null; } }
1918
public virtual uint BackgroundColor { get { throw null; } set { } }
2019
public virtual string CursiveFontFamily { get { throw null; } set { } }
@@ -135,6 +134,7 @@ public partial class DragData : CefSharp.Internals.CefWrapper, CefSharp.IDragDat
135134
internal DragData() { }
136135
public virtual string FileName { get { throw null; } set { } }
137136
public virtual System.Collections.Generic.IList<string> FileNames { get { throw null; } }
137+
public virtual System.Collections.Generic.IList<string> FilePaths { get { throw null; } }
138138
public virtual string FragmentBaseUrl { get { throw null; } set { } }
139139
public virtual string FragmentHtml { get { throw null; } set { } }
140140
public virtual string FragmentText { get { throw null; } set { } }

CefSharp.Core.Runtime/DragData.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,18 @@ namespace CefSharp
9090
}
9191
}
9292

93+
//TODO: Vector is a pointer, so can potentially be updated (items may be possibly removed)
94+
virtual property IList<String^>^ FilePaths
95+
{
96+
IList<String^>^ get()
97+
{
98+
auto paths = vector<CefString>();
99+
_wrappedDragData->GetFilePaths(paths);
100+
101+
return StringUtils::ToClr(paths);
102+
}
103+
}
104+
93105
virtual property String^ FragmentBaseUrl
94106
{
95107
String^ get()

CefSharp/IDragData.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ public interface IDragData : IDisposable
3535
/// </summary>
3636
IList<string> FileNames { get; }
3737

38+
/// <summary>
39+
/// Retrieve the list of file paths that are being dragged into the browser window
40+
/// </summary>
41+
IList<string> FilePaths { get; }
42+
3843
/// <summary>
3944
/// Return the base URL that the fragment came from. This value is used for resolving relative URLs and may be empty.
4045
/// </summary>

0 commit comments

Comments
 (0)