Add CefDragData::GetFilePaths to return file paths (fixes #3568)

GetFileNames now returns just the display names with a fallback to
path.BaseName() if the display name is empty.
This commit is contained in:
Cristian Amarie
2023-09-22 14:04:16 +03:00
committed by Marshall Greenblatt
parent 4ae030fec1
commit bdec92caf8
8 changed files with 105 additions and 9 deletions

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=a1ce746f0dd97d21973d4c80d8ef46391c0fd463$
// $hash=8d00465ba004758f464cdb8b1fbd02cd26323ace$
//
#ifndef CEF_INCLUDE_CAPI_CEF_DRAG_DATA_CAPI_H_
@@ -149,6 +149,13 @@ typedef struct _cef_drag_data_t {
int(CEF_CALLBACK* get_file_names)(struct _cef_drag_data_t* self,
cef_string_list_t names);
///
/// Retrieve the list of file paths that are being dragged into the browser
/// window.
///
int(CEF_CALLBACK* get_file_paths)(struct _cef_drag_data_t* self,
cef_string_list_t paths);
///
/// Set the link URL that is being dragged.
///

View File

@@ -42,13 +42,13 @@
// way that may cause binary incompatibility with other builds. The universal
// hash value will change if any platform is affected whereas the platform hash
// values will change only if that particular platform is affected.
#define CEF_API_HASH_UNIVERSAL "c684c3da478cb88b042bf13c88ab7797e33c29bc"
#define CEF_API_HASH_UNIVERSAL "fb95812349ecedc56374e2d195b4af712f6f9ab3"
#if defined(OS_WIN)
#define CEF_API_HASH_PLATFORM "bcc26a8181330fd0dc07e9d2475c048919d4f55f"
#define CEF_API_HASH_PLATFORM "4b12d27bf02871c32719580c1be18d686e20bc84"
#elif defined(OS_MAC)
#define CEF_API_HASH_PLATFORM "2abec7e306f2c474c8a66b585b9c6a0bdcd45276"
#define CEF_API_HASH_PLATFORM "e6b30ef107ccb6ba9af40bd6498ad4cef247a171"
#elif defined(OS_LINUX)
#define CEF_API_HASH_PLATFORM "b93f84208be4af554a5b60315a63251263a71e57"
#define CEF_API_HASH_PLATFORM "a4ec73cc821ea2d1681c7f8271f0a7d3e3cea33a"
#endif
#ifdef __cplusplus

View File

@@ -145,6 +145,13 @@ class CefDragData : public virtual CefBaseRefCounted {
/*--cef()--*/
virtual bool GetFileNames(std::vector<CefString>& names) = 0;
///
/// Retrieve the list of file paths that are being dragged into the browser
/// window.
///
/*--cef()--*/
virtual bool GetFilePaths(std::vector<CefString>& paths) = 0;
///
/// Set the link URL that is being dragged.
///