Chromecast ATV: distinguish actual shutdown vs. lifecycle from sleep.
[chromium-blink-merge.git] / content / public / common / file_chooser_params.h
blobad612ab9ce22842085b01b1ae495bbfae368bdd5
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_COMMON_FILE_CHOOSER_PARAMS_H_
6 #define CONTENT_PUBLIC_COMMON_FILE_CHOOSER_PARAMS_H_
8 #include <vector>
10 #include "base/files/file_path.h"
11 #include "base/strings/string16.h"
12 #include "content/common/content_export.h"
14 namespace content {
16 // Struct used by WebContentsDelegate.
17 struct CONTENT_EXPORT FileChooserParams {
18 FileChooserParams();
19 ~FileChooserParams();
21 enum Mode {
22 // Requires that the file exists before allowing the user to pick it.
23 Open,
25 // Like Open, but allows picking multiple files to open.
26 OpenMultiple,
28 // Like Open, but selects a folder for upload.
29 UploadFolder,
31 // Allows picking a nonexistent file, and prompts to overwrite if the file
32 // already exists.
33 Save,
36 Mode mode;
38 // Title to be used for the dialog. This may be empty for the default title,
39 // which will be either "Open" or "Save" depending on the mode.
40 base::string16 title;
42 // Default file name to select in the dialog.
43 base::FilePath default_file_name;
45 // 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 std::vector<base::string16> accept_types;
49 // Whether the caller needs native file path or not.
50 bool need_local_path;
52 #if defined(OS_ANDROID)
53 // 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 bool capture;
56 #endif
59 } // namespace content
61 #endif // CONTENT_PUBLIC_COMMON_FILE_CHOOSER_PARAMS_H_