Chromium Code Reviews| 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 163 // NOTE: only one instance of any shell dialog can be shown per owning_window | 163 // NOTE: only one instance of any shell dialog can be shown per owning_window |
| 164 // at a time (for obvious reasons). | 164 // at a time (for obvious reasons). |
| 165 void SelectFile(Type type, | 165 void SelectFile(Type type, |
| 166 const base::string16& title, | 166 const base::string16& title, |
| 167 const base::FilePath& default_path, | 167 const base::FilePath& default_path, |
| 168 const FileTypeInfo* file_types, | 168 const FileTypeInfo* file_types, |
| 169 int file_type_index, | 169 int file_type_index, |
| 170 const base::FilePath::StringType& default_extension, | 170 const base::FilePath::StringType& default_extension, |
| 171 gfx::NativeWindow owning_window, | 171 gfx::NativeWindow owning_window, |
| 172 void* params); | 172 void* params); |
| 173 | |
| 174 // Close the file-picker by sending an ESC key event to it. | |
|
msw
2015/10/23 22:33:26
nit: technically the ESC key technique is specific
| |
| 175 virtual void Close(); | |
| 176 | |
| 173 bool HasMultipleFileTypeChoices(); | 177 bool HasMultipleFileTypeChoices(); |
| 174 | 178 |
| 175 // Sets the global ShellDialogsDelegate. Defaults to NULL. | 179 // Sets the global ShellDialogsDelegate. Defaults to NULL. |
| 176 static void SetShellDialogsDelegate(ShellDialogsDelegate* delegate); | 180 static void SetShellDialogsDelegate(ShellDialogsDelegate* delegate); |
| 177 | 181 |
| 178 protected: | 182 protected: |
| 179 friend class base::RefCountedThreadSafe<SelectFileDialog>; | 183 friend class base::RefCountedThreadSafe<SelectFileDialog>; |
| 180 explicit SelectFileDialog(Listener* listener, SelectFilePolicy* policy); | 184 explicit SelectFileDialog(Listener* listener, SelectFilePolicy* policy); |
| 181 ~SelectFileDialog() override; | 185 ~SelectFileDialog() override; |
| 182 | 186 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 214 virtual bool HasMultipleFileTypeChoicesImpl() = 0; | 218 virtual bool HasMultipleFileTypeChoicesImpl() = 0; |
| 215 | 219 |
| 216 scoped_ptr<SelectFilePolicy> select_file_policy_; | 220 scoped_ptr<SelectFilePolicy> select_file_policy_; |
| 217 | 221 |
| 218 DISALLOW_COPY_AND_ASSIGN(SelectFileDialog); | 222 DISALLOW_COPY_AND_ASSIGN(SelectFileDialog); |
| 219 }; | 223 }; |
| 220 | 224 |
| 221 } // namespace ui | 225 } // namespace ui |
| 222 | 226 |
| 223 #endif // UI_SHELL_DIALOGS_SELECT_FILE_DIALOG_H_ | 227 #endif // UI_SHELL_DIALOGS_SELECT_FILE_DIALOG_H_ |
| OLD | NEW |