OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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.ui.base; | 5 package org.chromium.ui.base; |
6 | 6 |
7 import android.Manifest; | 7 import android.Manifest; |
8 import android.annotation.TargetApi; | 8 import android.annotation.TargetApi; |
9 import android.app.Activity; | 9 import android.app.Activity; |
10 import android.content.ClipData; | 10 import android.content.ClipData; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 private static final String VIDEO_TYPE = "video/"; | 47 private static final String VIDEO_TYPE = "video/"; |
48 private static final String AUDIO_TYPE = "audio/"; | 48 private static final String AUDIO_TYPE = "audio/"; |
49 private static final String ALL_IMAGE_TYPES = IMAGE_TYPE + "*"; | 49 private static final String ALL_IMAGE_TYPES = IMAGE_TYPE + "*"; |
50 private static final String ALL_VIDEO_TYPES = VIDEO_TYPE + "*"; | 50 private static final String ALL_VIDEO_TYPES = VIDEO_TYPE + "*"; |
51 private static final String ALL_AUDIO_TYPES = AUDIO_TYPE + "*"; | 51 private static final String ALL_AUDIO_TYPES = AUDIO_TYPE + "*"; |
52 private static final String ANY_TYPES = "*/*"; | 52 private static final String ANY_TYPES = "*/*"; |
53 | 53 |
54 /** | 54 /** |
55 * If set, overrides the WindowAndroid passed in {@link selectFile()}. | 55 * If set, overrides the WindowAndroid passed in {@link selectFile()}. |
56 */ | 56 */ |
57 private static WindowAndroid sOverrideWindowAndroid = null; | 57 private static WindowAndroid sOverrideWindowAndroid; |
58 | 58 |
59 private final long mNativeSelectFileDialog; | 59 private final long mNativeSelectFileDialog; |
60 private List<String> mFileTypes; | 60 private List<String> mFileTypes; |
61 private boolean mCapture; | 61 private boolean mCapture; |
62 private boolean mAllowMultiple; | 62 private boolean mAllowMultiple; |
63 private Uri mCameraOutputUri; | 63 private Uri mCameraOutputUri; |
64 private WindowAndroid mWindowAndroid; | 64 private WindowAndroid mWindowAndroid; |
65 | 65 |
66 private boolean mSupportsImageCapture; | 66 private boolean mSupportsImageCapture; |
67 private boolean mSupportsVideoCapture; | 67 private boolean mSupportsVideoCapture; |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 private static SelectFileDialog create(long nativeSelectFileDialog) { | 451 private static SelectFileDialog create(long nativeSelectFileDialog) { |
452 return new SelectFileDialog(nativeSelectFileDialog); | 452 return new SelectFileDialog(nativeSelectFileDialog); |
453 } | 453 } |
454 | 454 |
455 private native void nativeOnFileSelected(long nativeSelectFileDialogImpl, | 455 private native void nativeOnFileSelected(long nativeSelectFileDialogImpl, |
456 String filePath, String displayName); | 456 String filePath, String displayName); |
457 private native void nativeOnMultipleFilesSelected(long nativeSelectFileDialo
gImpl, | 457 private native void nativeOnMultipleFilesSelected(long nativeSelectFileDialo
gImpl, |
458 String[] filePathArray, String[] displayNameArray); | 458 String[] filePathArray, String[] displayNameArray); |
459 private native void nativeOnFileNotSelected(long nativeSelectFileDialogImpl)
; | 459 private native void nativeOnFileNotSelected(long nativeSelectFileDialogImpl)
; |
460 } | 460 } |
OLD | NEW |