| 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/strings/string16.h" | 11 #include "base/strings/string16.h" |
| 12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 #include "url/gurl.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 24 matching lines...) Expand all Loading... |
| 47 std::vector<base::string16> accept_types; | 48 std::vector<base::string16> accept_types; |
| 48 | 49 |
| 49 // Whether the caller needs native file path or not. | 50 // Whether the caller needs native file path or not. |
| 50 bool need_local_path; | 51 bool need_local_path; |
| 51 | 52 |
| 52 #if defined(OS_ANDROID) | 53 #if defined(OS_ANDROID) |
| 53 // See http://www.w3.org/TR/html-media-capture for more information. | 54 // See http://www.w3.org/TR/html-media-capture for more information. |
| 54 // If true, the data should be obtained using the device's camera/mic/etc. | 55 // If true, the data should be obtained using the device's camera/mic/etc. |
| 55 bool capture; | 56 bool capture; |
| 56 #endif | 57 #endif |
| 58 |
| 59 // If non-empty, represents the URL of the requestor if the request was |
| 60 // initiated by a document. Note that this value should be considered |
| 61 // untrustworthy since it is specified by the sandbox and not validated. |
| 62 GURL requestor; |
| 57 }; | 63 }; |
| 58 | 64 |
| 59 } // namespace content | 65 } // namespace content |
| 60 | 66 |
| 61 #endif // CONTENT_PUBLIC_COMMON_FILE_CHOOSER_PARAMS_H_ | 67 #endif // CONTENT_PUBLIC_COMMON_FILE_CHOOSER_PARAMS_H_ |
| OLD | NEW |