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

Unified Diff: chrome/browser/file_select_helper.cc

Issue 10916160: Upstreaming SelectFileDialog for Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | « chrome/browser/android/tab_android.h ('k') | chrome/browser/platform_util_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/file_select_helper.cc
diff --git a/chrome/browser/file_select_helper.cc b/chrome/browser/file_select_helper.cc
index 43118c5a06f70d249c6def938b85264bb33ddbb4..ee1f3d362d2b3d6a6b8309a46a202144223fd293 100644
--- a/chrome/browser/file_select_helper.cc
+++ b/chrome/browser/file_select_helper.cc
@@ -409,6 +409,12 @@ void FileSelectHelper::RunFileChooserOnUIThread(
gfx::NativeWindow owning_window =
platform_util::GetTopLevel(render_view_host_->GetView()->GetNativeView());
+#if defined(OS_ANDROID)
+ // Android needs the original MIME types and an additional capture value.
+ std::vector<string16> accept_types(params.accept_types);
+ accept_types.push_back(params.capture);
+#endif
+
select_file_dialog_->SelectFile(
dialog_type_,
params.title,
@@ -419,7 +425,7 @@ void FileSelectHelper::RunFileChooserOnUIThread(
FILE_PATH_LITERAL(""),
owning_window,
#if defined(OS_ANDROID)
- const_cast<content::FileChooserParams*>(&params));
+ &accept_types);
#else
NULL);
#endif
« no previous file with comments | « chrome/browser/android/tab_android.h ('k') | chrome/browser/platform_util_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698