OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 UI_SHELL_DIALOGS_SELECT_FILE_DIALOG_H_ | 5 #ifndef UI_SHELL_DIALOGS_SELECT_FILE_DIALOG_H_ |
6 #define UI_SHELL_DIALOGS_SELECT_FILE_DIALOG_H_ | 6 #define UI_SHELL_DIALOGS_SELECT_FILE_DIALOG_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 struct SelectedFileInfo; | 24 struct SelectedFileInfo; |
25 class ShellDialogsDelegate; | 25 class ShellDialogsDelegate; |
26 | 26 |
27 // Shows a dialog box for selecting a file or a folder. | 27 // Shows a dialog box for selecting a file or a folder. |
28 class SHELL_DIALOGS_EXPORT SelectFileDialog | 28 class SHELL_DIALOGS_EXPORT SelectFileDialog |
29 : public base::RefCountedThreadSafe<SelectFileDialog>, | 29 : public base::RefCountedThreadSafe<SelectFileDialog>, |
30 public BaseShellDialog { | 30 public BaseShellDialog { |
31 public: | 31 public: |
32 enum Type { | 32 enum Type { |
33 SELECT_NONE, | 33 SELECT_NONE, |
| 34 |
| 35 // For opening a folder. |
34 SELECT_FOLDER, | 36 SELECT_FOLDER, |
| 37 |
| 38 // Like SELECT_FOLDER, but the dialog UI should explicitly show it's |
| 39 // specifically for "upload". |
| 40 SELECT_UPLOAD_FOLDER, |
| 41 |
| 42 // For saving into a file, allowing a nonexistent file to be selected. |
35 SELECT_SAVEAS_FILE, | 43 SELECT_SAVEAS_FILE, |
| 44 |
| 45 // For opening a file. |
36 SELECT_OPEN_FILE, | 46 SELECT_OPEN_FILE, |
| 47 |
| 48 // Like SELECT_OPEN_FILE, but allowing multiple files to open. |
37 SELECT_OPEN_MULTI_FILE | 49 SELECT_OPEN_MULTI_FILE |
38 }; | 50 }; |
39 | 51 |
40 // An interface implemented by a Listener object wishing to know about the | 52 // An interface implemented by a Listener object wishing to know about the |
41 // the result of the Select File/Folder action. These callbacks must be | 53 // the result of the Select File/Folder action. These callbacks must be |
42 // re-entrant. | 54 // re-entrant. |
43 class SHELL_DIALOGS_EXPORT Listener { | 55 class SHELL_DIALOGS_EXPORT Listener { |
44 public: | 56 public: |
45 // Notifies the Listener that a file/folder selection has been made. The | 57 // Notifies the Listener that a file/folder selection has been made. The |
46 // file/folder path is in |path|. |params| is contextual passed to | 58 // file/folder path is in |path|. |params| is contextual passed to |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 virtual bool HasMultipleFileTypeChoicesImpl() = 0; | 210 virtual bool HasMultipleFileTypeChoicesImpl() = 0; |
199 | 211 |
200 scoped_ptr<SelectFilePolicy> select_file_policy_; | 212 scoped_ptr<SelectFilePolicy> select_file_policy_; |
201 | 213 |
202 DISALLOW_COPY_AND_ASSIGN(SelectFileDialog); | 214 DISALLOW_COPY_AND_ASSIGN(SelectFileDialog); |
203 }; | 215 }; |
204 | 216 |
205 } // namespace ui | 217 } // namespace ui |
206 | 218 |
207 #endif // UI_SHELL_DIALOGS_SELECT_FILE_DIALOG_H_ | 219 #endif // UI_SHELL_DIALOGS_SELECT_FILE_DIALOG_H_ |
OLD | NEW |