| 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/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 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 namespace { | 25 namespace { |
| 26 | 26 |
| 27 // Optional dialog factory. Leaked. | 27 // Optional dialog factory. Leaked. |
| 28 ui::SelectFileDialogFactory* dialog_factory_ = NULL; | 28 ui::SelectFileDialogFactory* dialog_factory_ = NULL; |
| 29 | 29 |
| 30 } // namespace | 30 } // namespace |
| 31 | 31 |
| 32 namespace ui { | 32 namespace ui { |
| 33 | 33 |
| 34 SelectFileDialog::FileTypeInfo::FileTypeInfo() : include_all_files(false) {} | 34 SelectFileDialog::FileTypeInfo::FileTypeInfo() |
| 35 : include_all_files(false), |
| 36 support_gdata(false) {} |
| 35 | 37 |
| 36 SelectFileDialog::FileTypeInfo::~FileTypeInfo() {} | 38 SelectFileDialog::FileTypeInfo::~FileTypeInfo() {} |
| 37 | 39 |
| 38 void SelectFileDialog::Listener::FileSelectedWithExtraInfo( | 40 void SelectFileDialog::Listener::FileSelectedWithExtraInfo( |
| 39 const ui::SelectedFileInfo& file, | 41 const ui::SelectedFileInfo& file, |
| 40 int index, | 42 int index, |
| 41 void* params) { | 43 void* params) { |
| 42 // Most of the dialogs need actual local path, so default to it. | 44 // Most of the dialogs need actual local path, so default to it. |
| 43 FileSelected(file.local_path, index, params); | 45 FileSelected(file.local_path, index, params); |
| 44 } | 46 } |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 } | 131 } |
| 130 | 132 |
| 131 SelectFileDialog::~SelectFileDialog() {} | 133 SelectFileDialog::~SelectFileDialog() {} |
| 132 | 134 |
| 133 void SelectFileDialog::CancelFileSelection(void* params) { | 135 void SelectFileDialog::CancelFileSelection(void* params) { |
| 134 if (listener_) | 136 if (listener_) |
| 135 listener_->FileSelectionCanceled(params); | 137 listener_->FileSelectionCanceled(params); |
| 136 } | 138 } |
| 137 | 139 |
| 138 } // namespace ui | 140 } // namespace ui |
| OLD | NEW |