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

Side by Side Diff: android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java

Issue 2735633004: HTML Media Capture: update capture attribute to use string. (Closed)
Patch Set: Fix for android webview Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 package org.chromium.android_webview; 5 package org.chromium.android_webview;
6 6
7 import android.annotation.TargetApi; 7 import android.annotation.TargetApi;
8 import android.content.Context; 8 import android.content.Context;
9 import android.media.AudioManager; 9 import android.media.AudioManager;
10 import android.net.Uri; 10 import android.net.Uri;
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 } 213 }
214 }; 214 };
215 215
216 Message resend = handler.obtainMessage(msgContinuePendingReload); 216 Message resend = handler.obtainMessage(msgContinuePendingReload);
217 Message dontResend = handler.obtainMessage(msgCancelPendingReload); 217 Message dontResend = handler.obtainMessage(msgCancelPendingReload);
218 mContentsClient.getCallbackHelper().postOnFormResubmission(dontResend, r esend); 218 mContentsClient.getCallbackHelper().postOnFormResubmission(dontResend, r esend);
219 } 219 }
220 220
221 @Override 221 @Override
222 public void runFileChooser(final int processId, final int renderId, final in t modeFlags, 222 public void runFileChooser(final int processId, final int renderId, final in t modeFlags,
223 String acceptTypes, String title, String defaultFilename, boolean ca pture) { 223 String acceptTypes, String title, String defaultFilename, String cap ture) {
224 AwContentsClient.FileChooserParamsImpl params = new AwContentsClient.Fil eChooserParamsImpl( 224 AwContentsClient.FileChooserParamsImpl params = new AwContentsClient.Fil eChooserParamsImpl(
225 modeFlags, acceptTypes, title, defaultFilename, capture); 225 modeFlags, acceptTypes, title, defaultFilename, capture);
226 226
227 mContentsClient.showFileChooser(new ValueCallback<String[]>() { 227 mContentsClient.showFileChooser(new ValueCallback<String[]>() {
228 boolean mCompleted; 228 boolean mCompleted;
229 @Override 229 @Override
230 public void onReceiveValue(String[] results) { 230 public void onReceiveValue(String[] results) {
231 if (mCompleted) { 231 if (mCompleted) {
232 throw new IllegalStateException("Duplicate showFileChooser r esult"); 232 throw new IllegalStateException("Duplicate showFileChooser r esult");
233 } 233 }
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 * or an empty string otherwise. 369 * or an empty string otherwise.
370 */ 370 */
371 private String resolveFileName(String filePath) { 371 private String resolveFileName(String filePath) {
372 if (filePath == null) return ""; 372 if (filePath == null) return "";
373 Uri uri = Uri.parse(filePath); 373 Uri uri = Uri.parse(filePath);
374 return ContentUriUtils.getDisplayName( 374 return ContentUriUtils.getDisplayName(
375 uri, mContext, MediaStore.MediaColumns.DISPLAY_NAME); 375 uri, mContext, MediaStore.MediaColumns.DISPLAY_NAME);
376 } 376 }
377 } 377 }
378 } 378 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698