summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/public/WebFileChooserCompletion.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-05-07 11:21:11 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-05-07 11:21:11 +0200
commit2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (patch)
tree988e8c5b116dd0466244ae2fe5af8ee9be926d76 /Source/WebKit/chromium/public/WebFileChooserCompletion.h
parentdd91e772430dc294e3bf478c119ef8d43c0a3358 (diff)
downloadqtwebkit-2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47.tar.gz
Imported WebKit commit 7e538425aa020340619e927792f3d895061fb54b (http://svn.webkit.org/repository/webkit/trunk@116286)
Diffstat (limited to 'Source/WebKit/chromium/public/WebFileChooserCompletion.h')
-rw-r--r--Source/WebKit/chromium/public/WebFileChooserCompletion.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/Source/WebKit/chromium/public/WebFileChooserCompletion.h b/Source/WebKit/chromium/public/WebFileChooserCompletion.h
index 14bace4c2..9b01d0e41 100644
--- a/Source/WebKit/chromium/public/WebFileChooserCompletion.h
+++ b/Source/WebKit/chromium/public/WebFileChooserCompletion.h
@@ -31,18 +31,36 @@
#ifndef WebFileChooserCompletion_h
#define WebFileChooserCompletion_h
+#include "platform/WebString.h"
+
namespace WebKit {
-class WebString;
template <typename T> class WebVector;
// Gets called back when WebViewClient finished choosing a file.
class WebFileChooserCompletion {
public:
+ struct SelectedFileInfo {
+ // The actual path of the selected file.
+ WebString path;
+
+ // The display name of the file that is to be exposed as File.name in
+ // the DOM layer. If it is empty the base part of the |path| is used.
+ WebString displayName;
+ };
+
// Called with zero or more file names. Zero-lengthed vector means that
// the user cancelled or that file choosing failed. The callback instance
// is destroyed when this method is called.
virtual void didChooseFile(const WebVector<WebString>& fileNames) = 0;
+
+ // Called with zero or more files, given as a vector of SelectedFileInfo.
+ // Zero-lengthed vector means that the user cancelled or that file
+ // choosing failed. The callback instance is destroyed when this method
+ // is called.
+ // FIXME: Deprecate either one of the didChooseFile (and rename it to
+ // didChooseFile*s*).
+ virtual void didChooseFile(const WebVector<SelectedFileInfo>&) { }
protected:
virtual ~WebFileChooserCompletion() {}
};