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

Unified Diff: ui/shell_dialogs/select_file_dialog_android.cc

Issue 157573002: Merge 248707 "Figure out the display name for a content uri." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1750/src/
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/shell_dialogs/select_file_dialog_android.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « ui/shell_dialogs/select_file_dialog_android.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698