summaryrefslogtreecommitdiff
path: root/Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.cpp
diff options
context:
space:
mode:
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