| 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 #include "ui/shell_dialogs/select_file_dialog_win.h" | 5 #include "ui/shell_dialogs/select_file_dialog_win.h" |
| 6 | 6 |
| 7 #include <shlobj.h> | 7 #include <shlobj.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 // SelectFileDialog implementation: | 172 // SelectFileDialog implementation: |
| 173 void SelectFileImpl( | 173 void SelectFileImpl( |
| 174 Type type, | 174 Type type, |
| 175 const base::string16& title, | 175 const base::string16& title, |
| 176 const base::FilePath& default_path, | 176 const base::FilePath& default_path, |
| 177 const FileTypeInfo* file_types, | 177 const FileTypeInfo* file_types, |
| 178 int file_type_index, | 178 int file_type_index, |
| 179 const base::FilePath::StringType& default_extension, | 179 const base::FilePath::StringType& default_extension, |
| 180 gfx::NativeWindow owning_window, | 180 gfx::NativeWindow owning_window, |
| 181 void* params) override; | 181 void* params) override; |
| 182 void CloseImpl() override; |
| 182 | 183 |
| 183 private: | 184 private: |
| 184 ~SelectFileDialogImpl() override; | 185 ~SelectFileDialogImpl() override; |
| 185 | 186 |
| 186 // A struct for holding all the state necessary for displaying a Save dialog. | 187 // A struct for holding all the state necessary for displaying a Save dialog. |
| 187 struct ExecuteSelectParams { | 188 struct ExecuteSelectParams { |
| 188 ExecuteSelectParams(Type type, | 189 ExecuteSelectParams(Type type, |
| 189 const std::wstring& title, | 190 const std::wstring& title, |
| 190 const base::FilePath& default_path, | 191 const base::FilePath& default_path, |
| 191 const FileTypeInfo* file_types, | 192 const FileTypeInfo* file_types, |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 ui::SelectFilePolicy* policy, | 306 ui::SelectFilePolicy* policy, |
| 306 const base::Callback<bool(OPENFILENAME*)>& get_open_file_name_impl, | 307 const base::Callback<bool(OPENFILENAME*)>& get_open_file_name_impl, |
| 307 const base::Callback<bool(OPENFILENAME*)>& get_save_file_name_impl) | 308 const base::Callback<bool(OPENFILENAME*)>& get_save_file_name_impl) |
| 308 : SelectFileDialog(listener, policy), | 309 : SelectFileDialog(listener, policy), |
| 309 BaseShellDialogImpl(), | 310 BaseShellDialogImpl(), |
| 310 has_multiple_file_type_choices_(false), | 311 has_multiple_file_type_choices_(false), |
| 311 get_open_file_name_impl_(get_open_file_name_impl), | 312 get_open_file_name_impl_(get_open_file_name_impl), |
| 312 get_save_file_name_impl_(get_save_file_name_impl) { | 313 get_save_file_name_impl_(get_save_file_name_impl) { |
| 313 } | 314 } |
| 314 | 315 |
| 316 void SelectFileDialogImpl::CloseImpl() { |
| 317 NOTIMPLEMENTED(); |
| 318 } |
| 319 |
| 315 SelectFileDialogImpl::~SelectFileDialogImpl() { | 320 SelectFileDialogImpl::~SelectFileDialogImpl() { |
| 316 } | 321 } |
| 317 | 322 |
| 318 void SelectFileDialogImpl::SelectFileImpl( | 323 void SelectFileDialogImpl::SelectFileImpl( |
| 319 Type type, | 324 Type type, |
| 320 const base::string16& title, | 325 const base::string16& title, |
| 321 const base::FilePath& default_path, | 326 const base::FilePath& default_path, |
| 322 const FileTypeInfo* file_types, | 327 const FileTypeInfo* file_types, |
| 323 int file_type_index, | 328 int file_type_index, |
| 324 const base::FilePath::StringType& default_extension, | 329 const base::FilePath::StringType& default_extension, |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 762 SelectFileDialog* CreateDefaultWinSelectFileDialog( | 767 SelectFileDialog* CreateDefaultWinSelectFileDialog( |
| 763 SelectFileDialog::Listener* listener, | 768 SelectFileDialog::Listener* listener, |
| 764 SelectFilePolicy* policy) { | 769 SelectFilePolicy* policy) { |
| 765 return CreateWinSelectFileDialog(listener, | 770 return CreateWinSelectFileDialog(listener, |
| 766 policy, | 771 policy, |
| 767 base::Bind(&CallBuiltinGetOpenFileName), | 772 base::Bind(&CallBuiltinGetOpenFileName), |
| 768 base::Bind(&CallBuiltinGetSaveFileName)); | 773 base::Bind(&CallBuiltinGetSaveFileName)); |
| 769 } | 774 } |
| 770 | 775 |
| 771 } // namespace ui | 776 } // namespace ui |
| OLD | NEW |