Chromium Code Reviews| Index: ui/android/java/src/org/chromium/ui/OnPhotoPickerListener.java |
| diff --git a/ui/android/java/src/org/chromium/ui/OnPhotoPickerListener.java b/ui/android/java/src/org/chromium/ui/OnPhotoPickerListener.java |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..531f1c5f722b1a524319265700617c4c4ded547d |
| --- /dev/null |
| +++ b/ui/android/java/src/org/chromium/ui/OnPhotoPickerListener.java |
| @@ -0,0 +1,43 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +package org.chromium.ui; |
| + |
| +import java.util.Map; |
| + |
| +/** |
| + * The callback used to indicate what action the user took in the picker. |
| + */ |
| +public interface OnPhotoPickerListener { |
| + /** |
| + * The action the user took in the picker. |
|
Michael van Ouwerkerk
2017/03/13 14:04:17
nit: use one space after *
Finnur
2017/03/14 14:35:41
Done.
|
| + */ |
| + enum Action { |
| + PHOTOS_SELECTED, |
| + LAUNCH_CAMERA, |
| + LAUNCH_GALLERY, |
| + } |
| + |
| + /** |
| + * The types of requests supported. |
| + */ |
| + static final int TAKE_PHOTO_REQUEST = 1; |
| + static final int SHOW_GALLERY = 2; |
| + |
| + /** |
| + * Called when the user has selected an action. For possible actions see |
| + * above. |
| + * |
| + * @param photos The photos that were selected. |
| + */ |
| + void onPickerUserAction(Action action, String[] photos); |
| + |
| + /** |
| + * Used during testing to provide pre-canned data to the dialog. |
| + * |
| + * @return The test files to use (Map<String, Long>, mapping file paths to creation times) or |
| + * null when run outside of a test. |
| + */ |
| + Map<String, Long> getFilesForTesting(); |
|
Michael van Ouwerkerk
2017/03/13 14:04:17
@Nullable
Finnur
2017/03/14 14:35:41
Done.
|
| +} |