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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // Otherwise it will start displaying the dialog box. This will also | 112 // Otherwise it will start displaying the dialog box. This will also |
113 // block the calling window until the dialog box is complete. The listener | 113 // block the calling window until the dialog box is complete. The listener |
114 // associated with this object will be notified when the selection is | 114 // associated with this object will be notified when the selection is |
115 // complete. | 115 // complete. |
116 // |type| is the type of file dialog to be shown, see Type enumeration above. | 116 // |type| is the type of file dialog to be shown, see Type enumeration above. |
117 // |title| is the title to be displayed in the dialog. If this string is | 117 // |title| is the title to be displayed in the dialog. If this string is |
118 // empty, the default title is used. | 118 // empty, the default title is used. |
119 // |default_path| is the default path and suggested file name to be shown in | 119 // |default_path| is the default path and suggested file name to be shown in |
120 // the dialog. This only works for SELECT_SAVEAS_FILE and SELECT_OPEN_FILE. | 120 // the dialog. This only works for SELECT_SAVEAS_FILE and SELECT_OPEN_FILE. |
121 // Can be an empty string to indicate the platform default. | 121 // Can be an empty string to indicate the platform default. |
122 // |file_types| holds the infomation about the file types allowed. Pass NULL | 122 // |file_types| holds the information about the file types allowed. Pass NULL |
123 // to get no special behavior | 123 // to get no special behavior |
124 // |file_type_index| is the 1-based index into the file type list in | 124 // |file_type_index| is the 1-based index into the file type list in |
125 // |file_types|. Specify 0 if you don't need to specify extension behavior. | 125 // |file_types|. Specify 0 if you don't need to specify extension behavior. |
126 // |default_extension| is the default extension to add to the file if the | 126 // |default_extension| is the default extension to add to the file if the |
127 // user doesn't type one. This should NOT include the '.'. On Windows, if | 127 // user doesn't type one. This should NOT include the '.'. On Windows, if |
128 // you specify this you must also specify |file_types|. | 128 // you specify this you must also specify |file_types|. |
129 // |source_contents| is the TabContents the call is originating from, i.e. | 129 // |source_contents| is the TabContents the call is originating from, i.e. |
130 // where the InfoBar should be shown in case file-selection dialogs are | 130 // where the InfoBar should be shown in case file-selection dialogs are |
131 // forbidden by policy, or NULL if no InfoBar should be shown. | 131 // forbidden by policy, or NULL if no InfoBar should be shown. |
132 // |owning_window| is the window the dialog is modal to, or NULL for a | 132 // |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... |
175 | 175 |
176 // Informs the |listener_| that the file selection dialog was canceled. Moved | 176 // Informs the |listener_| that the file selection dialog was canceled. Moved |
177 // to a function for being able to post it to the message loop. | 177 // to a function for being able to post it to the message loop. |
178 void CancelFileSelection(void* params); | 178 void CancelFileSelection(void* params); |
179 | 179 |
180 // Returns true if the dialog has multiple file type choices. | 180 // Returns true if the dialog has multiple file type choices. |
181 virtual bool HasMultipleFileTypeChoicesImpl() = 0; | 181 virtual bool HasMultipleFileTypeChoicesImpl() = 0; |
182 }; | 182 }; |
183 | 183 |
184 #endif // CHROME_BROWSER_UI_SELECT_FILE_DIALOG_H_ | 184 #endif // CHROME_BROWSER_UI_SELECT_FILE_DIALOG_H_ |
OLD | NEW |