OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 24 matching lines...) Expand all Loading... |
35 #include "core/html/forms/BaseClickableWithKeyInputType.h" | 35 #include "core/html/forms/BaseClickableWithKeyInputType.h" |
36 #include "platform/FileChooser.h" | 36 #include "platform/FileChooser.h" |
37 #include "platform/heap/Handle.h" | 37 #include "platform/heap/Handle.h" |
38 #include "wtf/RefPtr.h" | 38 #include "wtf/RefPtr.h" |
39 | 39 |
40 namespace blink { | 40 namespace blink { |
41 | 41 |
42 class DragData; | 42 class DragData; |
43 class FileList; | 43 class FileList; |
44 | 44 |
45 class FileInputType FINAL : public BaseClickableWithKeyInputType, private FileCh
ooserClient { | 45 class FileInputType final : public BaseClickableWithKeyInputType, private FileCh
ooserClient { |
46 public: | 46 public: |
47 static PassRefPtrWillBeRawPtr<InputType> create(HTMLInputElement&); | 47 static PassRefPtrWillBeRawPtr<InputType> create(HTMLInputElement&); |
48 virtual void trace(Visitor*) OVERRIDE; | 48 virtual void trace(Visitor*) override; |
49 static Vector<FileChooserFileInfo> filesFromFormControlState(const FormContr
olState&); | 49 static Vector<FileChooserFileInfo> filesFromFormControlState(const FormContr
olState&); |
50 | 50 |
51 private: | 51 private: |
52 FileInputType(HTMLInputElement&); | 52 FileInputType(HTMLInputElement&); |
53 virtual const AtomicString& formControlType() const OVERRIDE; | 53 virtual const AtomicString& formControlType() const override; |
54 virtual FormControlState saveFormControlState() const OVERRIDE; | 54 virtual FormControlState saveFormControlState() const override; |
55 virtual void restoreFormControlState(const FormControlState&) OVERRIDE; | 55 virtual void restoreFormControlState(const FormControlState&) override; |
56 virtual bool appendFormData(FormDataList&, bool) const OVERRIDE; | 56 virtual bool appendFormData(FormDataList&, bool) const override; |
57 virtual bool valueMissing(const String&) const OVERRIDE; | 57 virtual bool valueMissing(const String&) const override; |
58 virtual String valueMissingText() const OVERRIDE; | 58 virtual String valueMissingText() const override; |
59 virtual void handleDOMActivateEvent(Event*) OVERRIDE; | 59 virtual void handleDOMActivateEvent(Event*) override; |
60 virtual RenderObject* createRenderer(RenderStyle*) const OVERRIDE; | 60 virtual RenderObject* createRenderer(RenderStyle*) const override; |
61 virtual bool canSetStringValue() const OVERRIDE; | 61 virtual bool canSetStringValue() const override; |
62 virtual FileList* files() OVERRIDE; | 62 virtual FileList* files() override; |
63 virtual void setFiles(FileList*) OVERRIDE; | 63 virtual void setFiles(FileList*) override; |
64 virtual bool canSetValue(const String&) OVERRIDE; | 64 virtual bool canSetValue(const String&) override; |
65 virtual bool getTypeSpecificValue(String&) OVERRIDE; // Checked first, befor
e internal storage or the value attribute. | 65 virtual bool getTypeSpecificValue(String&) override; // Checked first, befor
e internal storage or the value attribute. |
66 virtual void setValue(const String&, bool valueChanged, TextFieldEventBehavi
or) OVERRIDE; | 66 virtual void setValue(const String&, bool valueChanged, TextFieldEventBehavi
or) override; |
67 virtual bool receiveDroppedFiles(const DragData*) OVERRIDE; | 67 virtual bool receiveDroppedFiles(const DragData*) override; |
68 virtual String droppedFileSystemId() OVERRIDE; | 68 virtual String droppedFileSystemId() override; |
69 virtual void createShadowSubtree() OVERRIDE; | 69 virtual void createShadowSubtree() override; |
70 virtual void disabledAttributeChanged() OVERRIDE; | 70 virtual void disabledAttributeChanged() override; |
71 virtual void multipleAttributeChanged() OVERRIDE; | 71 virtual void multipleAttributeChanged() override; |
72 virtual String defaultToolTip() const OVERRIDE; | 72 virtual String defaultToolTip() const override; |
73 | 73 |
74 // FileChooserClient implementation. | 74 // FileChooserClient implementation. |
75 virtual void filesChosen(const Vector<FileChooserFileInfo>&) OVERRIDE; | 75 virtual void filesChosen(const Vector<FileChooserFileInfo>&) override; |
76 | 76 |
77 FileList* createFileList(const Vector<FileChooserFileInfo>& files) const; | 77 FileList* createFileList(const Vector<FileChooserFileInfo>& files) const; |
78 void receiveDropForDirectoryUpload(const Vector<String>&); | 78 void receiveDropForDirectoryUpload(const Vector<String>&); |
79 | 79 |
80 PersistentWillBeMember<FileList> m_fileList; | 80 PersistentWillBeMember<FileList> m_fileList; |
81 | 81 |
82 String m_droppedFileSystemId; | 82 String m_droppedFileSystemId; |
83 }; | 83 }; |
84 | 84 |
85 } // namespace blink | 85 } // namespace blink |
86 | 86 |
87 #endif // FileInputType_h | 87 #endif // FileInputType_h |
OLD | NEW |