Index: ui/shell_dialogs/select_file_dialog_android.cc |
=================================================================== |
--- ui/shell_dialogs/select_file_dialog_android.cc (revision 249688) |
+++ ui/shell_dialogs/select_file_dialog_android.cc (working copy) |
@@ -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 @@ |
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; |