Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(321)

Side by Side Diff: ui/shell_dialogs/select_file_dialog_win.cc

Issue 2123803003: Remove WinXP hook for OPENFILENAME (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/base/win/open_file_name_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 if (suggested_file_name.value() == L"\\") 438 if (suggested_file_name.value() == L"\\")
439 suggested_file_name.clear(); 439 suggested_file_name.clear();
440 } 440 }
441 save_as.SetInitialSelection(suggested_directory, suggested_file_name); 441 save_as.SetInitialSelection(suggested_directory, suggested_file_name);
442 } 442 }
443 443
444 save_as.GetOPENFILENAME()->lpstrFilter = 444 save_as.GetOPENFILENAME()->lpstrFilter =
445 filter.empty() ? NULL : filter.c_str(); 445 filter.empty() ? NULL : filter.c_str();
446 save_as.GetOPENFILENAME()->nFilterIndex = *index; 446 save_as.GetOPENFILENAME()->nFilterIndex = *index;
447 save_as.GetOPENFILENAME()->lpstrDefExt = &def_ext[0]; 447 save_as.GetOPENFILENAME()->lpstrDefExt = &def_ext[0];
448 save_as.MaybeInstallWindowPositionHookForSaveAsOnXP();
449 448
450 if (!get_save_file_name_impl_.Run(save_as.GetOPENFILENAME())) 449 if (!get_save_file_name_impl_.Run(save_as.GetOPENFILENAME()))
451 return false; 450 return false;
452 451
453 // Return the user's choice. 452 // Return the user's choice.
454 final_name->assign(save_as.GetOPENFILENAME()->lpstrFile); 453 final_name->assign(save_as.GetOPENFILENAME()->lpstrFile);
455 *index = save_as.GetOPENFILENAME()->nFilterIndex; 454 *index = save_as.GetOPENFILENAME()->nFilterIndex;
456 455
457 // Figure out what filter got selected. The filter index is 1-based. 456 // Figure out what filter got selected. The filter index is 1-based.
458 std::wstring filter_selected; 457 std::wstring filter_selected;
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 707
709 SelectFileDialog* CreateSelectFileDialog(SelectFileDialog::Listener* listener, 708 SelectFileDialog* CreateSelectFileDialog(SelectFileDialog::Listener* listener,
710 SelectFilePolicy* policy) { 709 SelectFilePolicy* policy) {
711 return CreateWinSelectFileDialog(listener, 710 return CreateWinSelectFileDialog(listener,
712 policy, 711 policy,
713 base::Bind(&CallBuiltinGetOpenFileName), 712 base::Bind(&CallBuiltinGetOpenFileName),
714 base::Bind(&CallBuiltinGetSaveFileName)); 713 base::Bind(&CallBuiltinGetSaveFileName));
715 } 714 }
716 715
717 } // namespace ui 716 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/win/open_file_name_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698