OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_PUBLIC_COMMON_FILE_CHOOSER_PARAMS_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_FILE_CHOOSER_PARAMS_H_ |
6 #define CONTENT_PUBLIC_COMMON_FILE_CHOOSER_PARAMS_H_ | 6 #define CONTENT_PUBLIC_COMMON_FILE_CHOOSER_PARAMS_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
11 #include "base/string16.h" | 11 #include "base/string16.h" |
12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileChooserParams. h" | |
13 | 14 |
14 namespace content { | 15 namespace content { |
15 | 16 |
16 // Struct used by WebContentsDelegate. | 17 // Struct used by WebContentsDelegate. |
17 struct CONTENT_EXPORT FileChooserParams { | 18 struct CONTENT_EXPORT FileChooserParams { |
18 FileChooserParams(); | 19 FileChooserParams(); |
19 ~FileChooserParams(); | 20 ~FileChooserParams(); |
20 | 21 |
21 enum Mode { | 22 enum Mode { |
22 // Requires that the file exists before allowing the user to pick it. | 23 // Requires that the file exists before allowing the user to pick it. |
(...skipping 17 matching lines...) Expand all Loading... | |
40 string16 title; | 41 string16 title; |
41 | 42 |
42 // Default file name to select in the dialog. | 43 // Default file name to select in the dialog. |
43 base::FilePath default_file_name; | 44 base::FilePath default_file_name; |
44 | 45 |
45 // A list of valid lower-cased MIME types or file extensions specified in an | 46 // A list of valid lower-cased MIME types or file extensions specified in an |
46 // input element. It is used to restrict selectable files to such types. | 47 // input element. It is used to restrict selectable files to such types. |
47 std::vector<string16> accept_types; | 48 std::vector<string16> accept_types; |
48 | 49 |
49 #if defined(OS_ANDROID) | 50 #if defined(OS_ANDROID) |
50 // Used to select items other than files, i.e. camera/mic. See | 51 // See http://www.w3.org/TR/html-media-capture for more information. |
51 // SelectFileDialog.java for more details. | 52 // If true, the data should be obtained using the device's camera/mic/etc. |
joth
2013/05/15 20:03:59
nit: position this comment inside the #if below im
| |
52 // TODO(jrg): upstream SelectFileDialog.java! Currently lives in chrome/. | 53 // TODO(jrg): upstream SelectFileDialog.java! Currently lives in chrome/. |
joth
2013/05/15 20:03:59
this TODO is obsolete and can go. (FTR - that file
| |
54 #if defined(NEW_MEDIA_CAPTURE_IMPLEMENTATION) | |
joth
2013/05/15 20:03:59
rather than spluging usage of this marco all over
| |
55 bool capture; | |
56 #else | |
53 string16 capture; | 57 string16 capture; |
54 #endif | 58 #endif |
59 #endif | |
55 }; | 60 }; |
56 | 61 |
57 } // namespace content | 62 } // namespace content |
58 | 63 |
59 #endif // CONTENT_PUBLIC_COMMON_FILE_CHOOSER_PARAMS_H_ | 64 #endif // CONTENT_PUBLIC_COMMON_FILE_CHOOSER_PARAMS_H_ |
OLD | NEW |