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

Side by Side Diff: ui/android/java/src/org/chromium/ui/PhotoPickerListener.java

Issue 2758313002: Implement the new Photo picker, part two. (Closed)
Patch Set: Address Ted's comments (and sync to latest) 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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; 5 package org.chromium.ui;
6 6
7 import android.support.annotation.Nullable; 7 import android.support.annotation.Nullable;
8 8
9 import java.util.Map; 9 import java.util.Map;
10 10
11 /** 11 /**
12 * The callback used to indicate what action the user took in the picker. 12 * The callback used to indicate what action the user took in the picker.
13 */ 13 */
14 public interface PhotoPickerListener { 14 public interface PhotoPickerListener {
15 /** 15 /**
16 * The action the user took in the picker. 16 * The action the user took in the picker.
17 */ 17 */
18 enum Action { 18 enum Action {
19 CANCEL,
19 PHOTOS_SELECTED, 20 PHOTOS_SELECTED,
20 LAUNCH_CAMERA, 21 LAUNCH_CAMERA,
21 LAUNCH_GALLERY, 22 LAUNCH_GALLERY,
22 } 23 }
23 24
24 /** 25 /**
25 * The types of requests supported. 26 * The types of requests supported.
26 */ 27 */
27 static final int TAKE_PHOTO_REQUEST = 1; 28 static final int TAKE_PHOTO_REQUEST = 1;
28 static final int SHOW_GALLERY = 2; 29 static final int SHOW_GALLERY = 2;
29 30
30 /** 31 /**
31 * Called when the user has selected an action. For possible actions see abo ve. 32 * Called when the user has selected an action. For possible actions see abo ve.
32 * 33 *
33 * @param photos The photos that were selected. 34 * @param photos The photos that were selected.
34 */ 35 */
35 void onPickerUserAction(Action action, String[] photos); 36 void onPickerUserAction(Action action, String[] photos);
36 37
37 /** 38 /**
38 * Used during testing to provide pre-canned data to the dialog. 39 * Used during testing to provide pre-canned data to the dialog.
39 * 40 *
40 * @return The test files to use (Map<String, Long>, mapping file paths to c reation times) or 41 * @return The test files to use (Map<String, Long>, mapping file paths to c reation times) or
41 * null when run outside of a test. 42 * null when run outside of a test.
42 */ 43 */
43 @Nullable 44 @Nullable
44 Map<String, Long> getFilesForTesting(); 45 Map<String, Long> getFilesForTesting();
45 } 46 }
OLDNEW
« no previous file with comments | « chrome/android/java_sources.gni ('k') | ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698