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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 if (!mWindowAndroid.showIntent(chooser, this, R.string.low_memory_error)
) { | 258 if (!mWindowAndroid.showIntent(chooser, this, R.string.low_memory_error)
) { |
259 onFileNotSelected(); | 259 onFileNotSelected(); |
260 } | 260 } |
261 } | 261 } |
262 | 262 |
263 @Override | 263 @Override |
264 public void onPickerUserAction(Action action, String[] photos) { | 264 public void onPickerUserAction(Action action, String[] photos) { |
265 UiUtils.dismissPhotoPicker(); | 265 UiUtils.dismissPhotoPicker(); |
266 | 266 |
267 switch (action) { | 267 switch (action) { |
| 268 case CANCEL: |
| 269 onFileNotSelected(); |
| 270 break; |
| 271 |
268 case PHOTOS_SELECTED: | 272 case PHOTOS_SELECTED: |
269 // TODO(finnur): Implement. | 273 // TODO(finnur): Implement. |
270 onFileNotSelected(); | 274 onFileNotSelected(); |
271 break; | 275 break; |
272 | 276 |
273 case LAUNCH_GALLERY: | 277 case LAUNCH_GALLERY: |
274 // TODO(finnur): Implement. | 278 // TODO(finnur): Implement. |
275 onFileNotSelected(); | 279 onFileNotSelected(); |
276 break; | 280 break; |
277 | 281 |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 static SelectFileDialog create(long nativeSelectFileDialog) { | 578 static SelectFileDialog create(long nativeSelectFileDialog) { |
575 return new SelectFileDialog(nativeSelectFileDialog); | 579 return new SelectFileDialog(nativeSelectFileDialog); |
576 } | 580 } |
577 | 581 |
578 private native void nativeOnFileSelected(long nativeSelectFileDialogImpl, | 582 private native void nativeOnFileSelected(long nativeSelectFileDialogImpl, |
579 String filePath, String displayName); | 583 String filePath, String displayName); |
580 private native void nativeOnMultipleFilesSelected(long nativeSelectFileDialo
gImpl, | 584 private native void nativeOnMultipleFilesSelected(long nativeSelectFileDialo
gImpl, |
581 String[] filePathArray, String[] displayNameArray); | 585 String[] filePathArray, String[] displayNameArray); |
582 private native void nativeOnFileNotSelected(long nativeSelectFileDialogImpl)
; | 586 private native void nativeOnFileNotSelected(long nativeSelectFileDialogImpl)
; |
583 } | 587 } |
OLD | NEW |