| 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 CHROME_BROWSER_UI_SELECT_FILE_DIALOG_H_ | 5 #ifndef CHROME_BROWSER_UI_SELECT_FILE_DIALOG_H_ |
| 6 #define CHROME_BROWSER_UI_SELECT_FILE_DIALOG_H_ | 6 #define CHROME_BROWSER_UI_SELECT_FILE_DIALOG_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // Otherwise it will start displaying the dialog box. This will also | 122 // Otherwise it will start displaying the dialog box. This will also |
| 123 // block the calling window until the dialog box is complete. The listener | 123 // block the calling window until the dialog box is complete. The listener |
| 124 // associated with this object will be notified when the selection is | 124 // associated with this object will be notified when the selection is |
| 125 // complete. | 125 // complete. |
| 126 // |type| is the type of file dialog to be shown, see Type enumeration above. | 126 // |type| is the type of file dialog to be shown, see Type enumeration above. |
| 127 // |title| is the title to be displayed in the dialog. If this string is | 127 // |title| is the title to be displayed in the dialog. If this string is |
| 128 // empty, the default title is used. | 128 // empty, the default title is used. |
| 129 // |default_path| is the default path and suggested file name to be shown in | 129 // |default_path| is the default path and suggested file name to be shown in |
| 130 // the dialog. This only works for SELECT_SAVEAS_FILE and SELECT_OPEN_FILE. | 130 // the dialog. This only works for SELECT_SAVEAS_FILE and SELECT_OPEN_FILE. |
| 131 // Can be an empty string to indicate the platform default. | 131 // Can be an empty string to indicate the platform default. |
| 132 // |file_types| holds the infomation about the file types allowed. Pass NULL | 132 // |file_types| holds the information about the file types allowed. Pass NULL |
| 133 // to get no special behavior | 133 // to get no special behavior |
| 134 // |file_type_index| is the 1-based index into the file type list in | 134 // |file_type_index| is the 1-based index into the file type list in |
| 135 // |file_types|. Specify 0 if you don't need to specify extension behavior. | 135 // |file_types|. Specify 0 if you don't need to specify extension behavior. |
| 136 // |default_extension| is the default extension to add to the file if the | 136 // |default_extension| is the default extension to add to the file if the |
| 137 // user doesn't type one. This should NOT include the '.'. On Windows, if | 137 // user doesn't type one. This should NOT include the '.'. On Windows, if |
| 138 // you specify this you must also specify |file_types|. | 138 // you specify this you must also specify |file_types|. |
| 139 // |source_contents| is the TabContents the call is originating from, i.e. | 139 // |source_contents| is the TabContents the call is originating from, i.e. |
| 140 // where the InfoBar should be shown in case file-selection dialogs are | 140 // where the InfoBar should be shown in case file-selection dialogs are |
| 141 // forbidden by policy, or NULL if no InfoBar should be shown. | 141 // forbidden by policy, or NULL if no InfoBar should be shown. |
| 142 // |owning_window| is the window the dialog is modal to, or NULL for a | 142 // |owning_window| is the window the dialog is modal to, or NULL for a |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 | 185 |
| 186 // Informs the |listener_| that the file selection dialog was canceled. Moved | 186 // Informs the |listener_| that the file selection dialog was canceled. Moved |
| 187 // to a function for being able to post it to the message loop. | 187 // to a function for being able to post it to the message loop. |
| 188 void CancelFileSelection(void* params); | 188 void CancelFileSelection(void* params); |
| 189 | 189 |
| 190 // Returns true if the dialog has multiple file type choices. | 190 // Returns true if the dialog has multiple file type choices. |
| 191 virtual bool HasMultipleFileTypeChoicesImpl() = 0; | 191 virtual bool HasMultipleFileTypeChoicesImpl() = 0; |
| 192 }; | 192 }; |
| 193 | 193 |
| 194 #endif // CHROME_BROWSER_UI_SELECT_FILE_DIALOG_H_ | 194 #endif // CHROME_BROWSER_UI_SELECT_FILE_DIALOG_H_ |
| OLD | NEW |