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 <windows.h> | 7 #include <windows.h> |
8 #include <commdlg.h> | 8 #include <commdlg.h> |
9 #include <shlobj.h> | 9 #include <shlobj.h> |
10 | 10 |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 base::Unretained(listener_))); | 568 base::Unretained(listener_))); |
569 return; | 569 return; |
570 } else if (type == SELECT_OPEN_MULTI_FILE) { | 570 } else if (type == SELECT_OPEN_MULTI_FILE) { |
571 aura::HandleOpenMultipleFiles( | 571 aura::HandleOpenMultipleFiles( |
572 UTF16ToWide(title), | 572 UTF16ToWide(title), |
573 default_path, | 573 default_path, |
574 GetFilterForFileTypes(*file_types), | 574 GetFilterForFileTypes(*file_types), |
575 base::Bind(&ui::SelectFileDialog::Listener::MultiFilesSelected, | 575 base::Bind(&ui::SelectFileDialog::Listener::MultiFilesSelected, |
576 base::Unretained(listener_))); | 576 base::Unretained(listener_))); |
577 return; | 577 return; |
| 578 } else if (type == SELECT_FOLDER) { |
| 579 aura::HandleSelectFolder( |
| 580 UTF16ToWide(title), |
| 581 base::Bind(&ui::SelectFileDialog::Listener::FileSelected, |
| 582 base::Unretained(listener_))); |
| 583 return; |
578 } | 584 } |
579 } | 585 } |
580 HWND owner = owning_window | 586 HWND owner = owning_window |
581 ? owning_window->GetRootWindow()->GetAcceleratedWidget() : NULL; | 587 ? owning_window->GetRootWindow()->GetAcceleratedWidget() : NULL; |
582 #else | 588 #else |
583 HWND owner = owning_window; | 589 HWND owner = owning_window; |
584 #endif | 590 #endif |
585 ExecuteSelectParams execute_params(type, UTF16ToWide(title), default_path, | 591 ExecuteSelectParams execute_params(type, UTF16ToWide(title), default_path, |
586 file_types, file_type_index, | 592 file_types, file_type_index, |
587 default_extension, BeginRun(owner), | 593 default_extension, BeginRun(owner), |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 return return_value; | 920 return return_value; |
915 } | 921 } |
916 | 922 |
917 SelectFileDialog* CreateWinSelectFileDialog( | 923 SelectFileDialog* CreateWinSelectFileDialog( |
918 SelectFileDialog::Listener* listener, | 924 SelectFileDialog::Listener* listener, |
919 SelectFilePolicy* policy) { | 925 SelectFilePolicy* policy) { |
920 return new SelectFileDialogImpl(listener, policy); | 926 return new SelectFileDialogImpl(listener, policy); |
921 } | 927 } |
922 | 928 |
923 } // namespace ui | 929 } // namespace ui |
OLD | NEW |