summaryrefslogtreecommitdiff
path: root/Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.cpp
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.cpp')
-rw-r--r--Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.cpp b/Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.cpp
index f63f5f72d..d503e6ab0 100644
--- a/Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.cpp
+++ b/Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.cpp
@@ -27,6 +27,7 @@
#include "WebOpenPanelResultListenerProxy.h"
#include "APIArray.h"
+#include "APIString.h"
#include "WebPageProxy.h"
#include <WebCore/URL.h>
#include <wtf/Vector.h>
@@ -44,25 +45,22 @@ WebOpenPanelResultListenerProxy::~WebOpenPanelResultListenerProxy()
{
}
-void WebOpenPanelResultListenerProxy::chooseFiles(API::Array* fileURLsArray)
+#if PLATFORM(IOS)
+void WebOpenPanelResultListenerProxy::chooseFiles(const Vector<WTF::String>& filenames, const String& displayString, const API::Data* iconImageData)
{
if (!m_page)
return;
- size_t size = fileURLsArray->size();
-
- Vector<String> filePaths;
- filePaths.reserveInitialCapacity(size);
+ m_page->didChooseFilesForOpenPanelWithDisplayStringAndIcon(filenames, displayString, iconImageData);
+}
+#endif
- for (size_t i = 0; i < size; ++i) {
- API::URL* apiURL = fileURLsArray->at<API::URL>(i);
- if (apiURL) {
- URL url(URL(), apiURL->string());
- filePaths.uncheckedAppend(url.fileSystemPath());
- }
- }
+void WebOpenPanelResultListenerProxy::chooseFiles(const Vector<String>& filenames)
+{
+ if (!m_page)
+ return;
- m_page->didChooseFilesForOpenPanel(filePaths);
+ m_page->didChooseFilesForOpenPanel(filenames);
}
void WebOpenPanelResultListenerProxy::cancel()
@@ -75,7 +73,7 @@ void WebOpenPanelResultListenerProxy::cancel()
void WebOpenPanelResultListenerProxy::invalidate()
{
- m_page = 0;
+ m_page = nullptr;
}
} // namespace WebKit