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

Side by Side Diff: ui/base/dialogs/select_file_dialog.cc

Issue 10804026: Fix open dialog not remembering last opened folder on drive (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | ui/base/dialogs/selected_file_info.h » ('j') | 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/base/dialogs/select_file_dialog.h" 5 #include "ui/base/dialogs/select_file_dialog.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 20 matching lines...) Expand all
31 namespace ui { 31 namespace ui {
32 32
33 SelectFileDialog::FileTypeInfo::FileTypeInfo() : include_all_files(false) {} 33 SelectFileDialog::FileTypeInfo::FileTypeInfo() : include_all_files(false) {}
34 34
35 SelectFileDialog::FileTypeInfo::~FileTypeInfo() {} 35 SelectFileDialog::FileTypeInfo::~FileTypeInfo() {}
36 36
37 void SelectFileDialog::Listener::FileSelectedWithExtraInfo( 37 void SelectFileDialog::Listener::FileSelectedWithExtraInfo(
38 const ui::SelectedFileInfo& file, 38 const ui::SelectedFileInfo& file,
39 int index, 39 int index,
40 void* params) { 40 void* params) {
41 FileSelected(file.path, index, params); 41 // Most of the dialogs need actual local path, so default to it.
42 FileSelected(file.local_path, index, params);
42 } 43 }
43 44
44 void SelectFileDialog::Listener::MultiFilesSelectedWithExtraInfo( 45 void SelectFileDialog::Listener::MultiFilesSelectedWithExtraInfo(
45 const std::vector<ui::SelectedFileInfo>& files, 46 const std::vector<ui::SelectedFileInfo>& files,
46 void* params) { 47 void* params) {
47 std::vector<FilePath> file_paths; 48 std::vector<FilePath> file_paths;
48 for (size_t i = 0; i < files.size(); ++i) 49 for (size_t i = 0; i < files.size(); ++i)
49 file_paths.push_back(files[i].path); 50 file_paths.push_back(files[i].local_path);
50 51
51 MultiFilesSelected(file_paths, params); 52 MultiFilesSelected(file_paths, params);
52 } 53 }
53 54
54 // static 55 // static
55 void SelectFileDialog::SetFactory(ui::SelectFileDialogFactory* factory) { 56 void SelectFileDialog::SetFactory(ui::SelectFileDialogFactory* factory) {
56 delete dialog_factory_; 57 delete dialog_factory_;
57 dialog_factory_ = factory; 58 dialog_factory_ = factory;
58 } 59 }
59 60
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 } 125 }
125 126
126 SelectFileDialog::~SelectFileDialog() {} 127 SelectFileDialog::~SelectFileDialog() {}
127 128
128 void SelectFileDialog::CancelFileSelection(void* params) { 129 void SelectFileDialog::CancelFileSelection(void* params) {
129 if (listener_) 130 if (listener_)
130 listener_->FileSelectionCanceled(params); 131 listener_->FileSelectionCanceled(params);
131 } 132 }
132 133
133 } // namespace ui 134 } // namespace ui
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | ui/base/dialogs/selected_file_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698