| Index: ui/shell_dialogs/select_file_dialog_android.cc
|
| diff --git a/ui/shell_dialogs/select_file_dialog_android.cc b/ui/shell_dialogs/select_file_dialog_android.cc
|
| index 40e15553e3ef51394abf019bcd9292be6f7d15fa..290d5091ef6dd0eb55a18be06bb38e029fe939c8 100644
|
| --- a/ui/shell_dialogs/select_file_dialog_android.cc
|
| +++ b/ui/shell_dialogs/select_file_dialog_android.cc
|
| @@ -14,6 +14,7 @@
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "jni/SelectFileDialog_jni.h"
|
| #include "ui/base/android/window_android.h"
|
| +#include "ui/shell_dialogs/selected_file_info.h"
|
|
|
| namespace ui {
|
|
|
| @@ -25,10 +26,19 @@ SelectFileDialogImpl* SelectFileDialogImpl::Create(Listener* listener,
|
|
|
| void SelectFileDialogImpl::OnFileSelected(JNIEnv* env,
|
| jobject java_object,
|
| - jstring filepath) {
|
| + jstring filepath,
|
| + jstring display_name) {
|
| if (listener_) {
|
| std::string path = base::android::ConvertJavaStringToUTF8(env, filepath);
|
| - listener_->FileSelected(base::FilePath(path), 0, NULL);
|
| + std::string file_name =
|
| + base::android::ConvertJavaStringToUTF8(env, display_name);
|
| + base::FilePath file_path = base::FilePath(path);
|
| + ui::SelectedFileInfo file_info;
|
| + file_info.file_path = file_path;
|
| + file_info.local_path = file_path;
|
| + if (!file_name.empty())
|
| + file_info.display_name = file_name;
|
| + listener_->FileSelectedWithExtraInfo(file_info, 0, NULL);
|
| }
|
|
|
| is_running_ = false;
|
|
|