#ifndef FileInputType_h
#define FileInputType_h
#include "core/html/forms/BaseClickableWithKeyInputType.h"
#include "heap/Handle.h"
#include "platform/FileChooser.h"
#include "wtf/RefPtr.h"
namespace WebCore {
class DragData;
class FileList;
class FileInputType FINAL : public BaseClickableWithKeyInputType, private FileChooserClient {
public:
static PassRefPtr<InputType> create(HTMLInputElement&);
static Vector<FileChooserFileInfo> filesFromFormControlState(const FormControlState&);
private:
FileInputType(HTMLInputElement&);
virtual const AtomicString& formControlType() const OVERRIDE;
virtual FormControlState saveFormControlState() const OVERRIDE;
virtual void restoreFormControlState(const FormControlState&) OVERRIDE;
virtual bool appendFormData(FormDataList&, bool) const OVERRIDE;
virtual bool valueMissing(const String&) const OVERRIDE;
virtual String valueMissingText() const OVERRIDE;
virtual void handleDOMActivateEvent(Event*) OVERRIDE;
virtual RenderObject* createRenderer(RenderStyle*) const OVERRIDE;
virtual bool canSetStringValue() const OVERRIDE;
virtual FileList* files() OVERRIDE;
virtual void setFiles(PassRefPtrWillBeRawPtr<FileList>) OVERRIDE;
virtual bool canSetValue(const String&) OVERRIDE;
virtual bool getTypeSpecificValue(String&) OVERRIDE;
virtual void setValue(const String&, bool valueChanged, TextFieldEventBehavior) OVERRIDE;
virtual bool receiveDroppedFiles(const DragData*) OVERRIDE;
virtual String droppedFileSystemId() OVERRIDE;
virtual bool isFileUpload() const OVERRIDE;
virtual void createShadowSubtree() OVERRIDE;
virtual void disabledAttributeChanged() OVERRIDE;
virtual void multipleAttributeChanged() OVERRIDE;
virtual String defaultToolTip() const OVERRIDE;
virtual void filesChosen(const Vector<FileChooserFileInfo>&) OVERRIDE;
PassRefPtrWillBeRawPtr<FileList> createFileList(const Vector<FileChooserFileInfo>& files) const;
void receiveDropForDirectoryUpload(const Vector<String>&);
RefPtrWillBePersistent<FileList> m_fileList;
String m_droppedFileSystemId;
};
}
#endif