Commit 450dfc0f authored by Kent Tamura's avatar Kent Tamura Committed by Commit Bot

Move FileChooser.{cpp,h} to core/html/forms/.

This will enable us to simplify some code. e.g.
- Merge WebFileChooserParams and FileChooserSettings
- Merge WebFileChooserCompletion::SelectedFileInfo and
  FileChooserFileInfo


Change-Id: Id6d2982d6fae1082edaf6f7cb405b228e17227df
Reviewed-on: https://chromium-review.googlesource.com/624832Reviewed-by: default avatarKeishi Hattori <keishi@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#496588}
parent 5cd8c289
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#define WebFileChooserCompletionImpl_h #define WebFileChooserCompletionImpl_h
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "platform/FileChooser.h" #include "core/html/forms/FileChooser.h"
#include "platform/wtf/RefPtr.h" #include "platform/wtf/RefPtr.h"
#include "public/platform/WebString.h" #include "public/platform/WebString.h"
#include "public/platform/WebVector.h" #include "public/platform/WebVector.h"
......
...@@ -396,6 +396,8 @@ blink_core_sources("html") { ...@@ -396,6 +396,8 @@ blink_core_sources("html") {
"forms/ExternalDateTimeChooser.h", "forms/ExternalDateTimeChooser.h",
"forms/ExternalPopupMenu.cpp", "forms/ExternalPopupMenu.cpp",
"forms/ExternalPopupMenu.h", "forms/ExternalPopupMenu.h",
"forms/FileChooser.cpp",
"forms/FileChooser.h",
"forms/FileInputType.cpp", "forms/FileInputType.cpp",
"forms/FileInputType.h", "forms/FileInputType.h",
"forms/FormController.cpp", "forms/FormController.cpp",
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
#include "base/gtest_prod_util.h" #include "base/gtest_prod_util.h"
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "core/html/TextControlElement.h" #include "core/html/TextControlElement.h"
#include "core/html/forms/FileChooser.h"
#include "core/html/forms/StepRange.h" #include "core/html/forms/StepRange.h"
#include "platform/FileChooser.h"
#include "platform/bindings/ActiveScriptWrappable.h" #include "platform/bindings/ActiveScriptWrappable.h"
namespace blink { namespace blink {
......
...@@ -26,12 +26,11 @@ ...@@ -26,12 +26,11 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include "platform/FileChooser.h" #include "core/html/forms/FileChooser.h"
namespace blink { namespace blink {
FileChooserClient::~FileChooserClient() { FileChooserClient::~FileChooserClient() {}
}
FileChooser* FileChooserClient::NewFileChooser( FileChooser* FileChooserClient::NewFileChooser(
const FileChooserSettings& settings) { const FileChooserSettings& settings) {
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#define FileChooser_h #define FileChooser_h
#include "platform/FileMetadata.h" #include "platform/FileMetadata.h"
#include "platform/PlatformExport.h"
#include "platform/heap/Handle.h" #include "platform/heap/Handle.h"
#include "platform/weborigin/KURL.h" #include "platform/weborigin/KURL.h"
#include "platform/wtf/Allocator.h" #include "platform/wtf/Allocator.h"
...@@ -74,10 +73,10 @@ struct FileChooserSettings { ...@@ -74,10 +73,10 @@ struct FileChooserSettings {
CaptureFacingMode capture; CaptureFacingMode capture;
// Returns a combined vector of acceptMIMETypes and acceptFileExtensions. // Returns a combined vector of acceptMIMETypes and acceptFileExtensions.
Vector<String> PLATFORM_EXPORT AcceptTypes() const; Vector<String> AcceptTypes() const;
}; };
class PLATFORM_EXPORT FileChooserClient : public GarbageCollectedMixin { class FileChooserClient : public GarbageCollectedMixin {
public: public:
virtual void FilesChosen(const Vector<FileChooserFileInfo>&) = 0; virtual void FilesChosen(const Vector<FileChooserFileInfo>&) = 0;
virtual ~FileChooserClient(); virtual ~FileChooserClient();
...@@ -89,7 +88,7 @@ class PLATFORM_EXPORT FileChooserClient : public GarbageCollectedMixin { ...@@ -89,7 +88,7 @@ class PLATFORM_EXPORT FileChooserClient : public GarbageCollectedMixin {
RefPtr<FileChooser> chooser_; RefPtr<FileChooser> chooser_;
}; };
class PLATFORM_EXPORT FileChooser : public RefCounted<FileChooser> { class FileChooser : public RefCounted<FileChooser> {
public: public:
static PassRefPtr<FileChooser> Create(FileChooserClient*, static PassRefPtr<FileChooser> Create(FileChooserClient*,
const FileChooserSettings&); const FileChooserSettings&);
......
...@@ -33,9 +33,9 @@ ...@@ -33,9 +33,9 @@
#define FileInputType_h #define FileInputType_h
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "core/html/forms/FileChooser.h"
#include "core/html/forms/InputType.h" #include "core/html/forms/InputType.h"
#include "core/html/forms/KeyboardClickableInputTypeView.h" #include "core/html/forms/KeyboardClickableInputTypeView.h"
#include "platform/FileChooser.h"
#include "platform/heap/Handle.h" #include "platform/heap/Handle.h"
#include "platform/wtf/RefPtr.h" #include "platform/wtf/RefPtr.h"
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include "core/html/HTMLFormControlElementWithState.h" #include "core/html/HTMLFormControlElementWithState.h"
#include "core/html/HTMLFormElement.h" #include "core/html/HTMLFormElement.h"
#include "core/html/HTMLInputElement.h" #include "core/html/HTMLInputElement.h"
#include "platform/FileChooser.h" #include "core/html/forms/FileChooser.h"
#include "platform/wtf/Deque.h" #include "platform/wtf/Deque.h"
#include "platform/wtf/HashTableDeletedValueType.h" #include "platform/wtf/HashTableDeletedValueType.h"
#include "platform/wtf/PtrUtil.h" #include "platform/wtf/PtrUtil.h"
......
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
#include "core/html/HTMLFormElement.h" #include "core/html/HTMLFormElement.h"
#include "core/html/forms/ColorChooser.h" #include "core/html/forms/ColorChooser.h"
#include "core/html/forms/DateTimeChooser.h" #include "core/html/forms/DateTimeChooser.h"
#include "core/html/forms/FileChooser.h"
#include "core/loader/DocumentLoader.h" #include "core/loader/DocumentLoader.h"
#include "platform/FileChooser.h"
#include "platform/wtf/PtrUtil.h" #include "platform/wtf/PtrUtil.h"
#include "public/platform/Platform.h" #include "public/platform/Platform.h"
#include "public/platform/WebApplicationCacheHost.h" #include "public/platform/WebApplicationCacheHost.h"
......
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
#include "core/html/forms/DateTimeChooserImpl.h" #include "core/html/forms/DateTimeChooserImpl.h"
#include "core/html/forms/ExternalDateTimeChooser.h" #include "core/html/forms/ExternalDateTimeChooser.h"
#include "core/html/forms/ExternalPopupMenu.h" #include "core/html/forms/ExternalPopupMenu.h"
#include "core/html/forms/FileChooser.h"
#include "core/html/forms/InternalPopupMenu.h" #include "core/html/forms/InternalPopupMenu.h"
#include "core/inspector/DevToolsEmulator.h" #include "core/inspector/DevToolsEmulator.h"
#include "core/layout/HitTestResult.h" #include "core/layout/HitTestResult.h"
...@@ -74,7 +75,6 @@ ...@@ -74,7 +75,6 @@
#include "core/page/PopupOpeningObserver.h" #include "core/page/PopupOpeningObserver.h"
#include "core/paint/compositing/CompositedSelection.h" #include "core/paint/compositing/CompositedSelection.h"
#include "platform/Cursor.h" #include "platform/Cursor.h"
#include "platform/FileChooser.h"
#include "platform/Histogram.h" #include "platform/Histogram.h"
#include "platform/LayoutTestSupport.h" #include "platform/LayoutTestSupport.h"
#include "platform/RuntimeEnabledFeatures.h" #include "platform/RuntimeEnabledFeatures.h"
......
...@@ -286,8 +286,6 @@ component("platform") { ...@@ -286,8 +286,6 @@ component("platform") {
"DragImage.h", "DragImage.h",
"EventDispatchForbiddenScope.cpp", "EventDispatchForbiddenScope.cpp",
"EventDispatchForbiddenScope.h", "EventDispatchForbiddenScope.h",
"FileChooser.cpp",
"FileChooser.h",
"FileMetadata.cpp", "FileMetadata.cpp",
"FileMetadata.h", "FileMetadata.h",
"FileSystemType.h", "FileSystemType.h",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment