Chromium Code Reviews| Index: ui/android/java/src/org/chromium/ui/InputDialogContainer.java |
| diff --git a/content/public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java b/ui/android/java/src/org/chromium/ui/InputDialogContainer.java |
| similarity index 95% |
| rename from content/public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java |
| rename to ui/android/java/src/org/chromium/ui/InputDialogContainer.java |
| index f2c91e6a9c6304bb69b330bd9fd41e68a16ef879..9c834be5a45945c4081ea260faa673fc0d6df7f5 100644 |
| --- a/content/public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java |
| +++ b/ui/android/java/src/org/chromium/ui/InputDialogContainer.java |
| @@ -2,7 +2,7 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -package org.chromium.content.browser.input; |
| +package org.chromium.ui; |
| import android.app.AlertDialog; |
| import android.app.DatePickerDialog.OnDateSetListener; |
| @@ -17,9 +17,8 @@ import android.widget.ListView; |
| import android.widget.TimePicker; |
| import org.chromium.base.ApiCompatibilityUtils; |
| -import org.chromium.content.R; |
| -import org.chromium.content.browser.input.DateTimePickerDialog.OnDateTimeSetListener; |
| -import org.chromium.content.browser.input.MultiFieldTimePickerDialog.OnMultiFieldTimeSetListener; |
| +import org.chromium.ui.DateTimePickerDialog.OnDateTimeSetListener; |
| +import org.chromium.ui.MultiFieldTimePickerDialog.OnMultiFieldTimeSetListener; |
| import java.util.Arrays; |
| import java.util.Calendar; |
| @@ -29,11 +28,11 @@ import java.util.TimeZone; |
| import java.util.concurrent.TimeUnit; |
| /** |
| - * Opens the approprate date/time picker dialog for the given dialog type. |
| + * Opens the appropriate date/time picker dialog for the given dialog type. |
| */ |
| public class InputDialogContainer { |
| - interface InputActionDelegate { |
| + public interface InputActionDelegate { |
|
ankit
2014/09/18 13:05:19
DateTimeChooserAndroid.java is implementing this i
|
| void cancelDateTimeDialog(); |
| void replaceDateTime(double value); |
| } |
| @@ -53,7 +52,7 @@ public class InputDialogContainer { |
| private AlertDialog mDialog; |
| private final InputActionDelegate mInputActionDelegate; |
| - static void initializeInputTypes(int textInputTypeDate, |
| + public static void initializeInputTypes(int textInputTypeDate, |
|
ankit
2014/09/18 13:05:19
DateTimeChooserAndroid.java is using this method.
|
| int textInputTypeDateTime, int textInputTypeDateTimeLocal, |
| int textInputTypeMonth, int textInputTypeTime, |
| int textInputTypeWeek) { |
| @@ -65,18 +64,18 @@ public class InputDialogContainer { |
| sTextInputTypeWeek = textInputTypeWeek; |
| } |
| - static boolean isDialogInputType(int type) { |
| + public static boolean isDialogInputType(int type) { |
|
ankit
2014/09/18 13:05:19
ImeAdapter is using this method.
|
| return type == sTextInputTypeDate || type == sTextInputTypeTime |
| || type == sTextInputTypeDateTime || type == sTextInputTypeDateTimeLocal |
| || type == sTextInputTypeMonth || type == sTextInputTypeWeek; |
| } |
| - InputDialogContainer(Context context, InputActionDelegate inputActionDelegate) { |
| + public InputDialogContainer(Context context, InputActionDelegate inputActionDelegate) { |
|
ankit
2014/09/18 13:05:19
InputDialogContainerForTests is extending this cla
|
| mContext = context; |
| mInputActionDelegate = inputActionDelegate; |
| } |
| - void showPickerDialog(final int dialogType, double dialogValue, |
| + public void showPickerDialog(final int dialogType, double dialogValue, |
|
ankit
2014/09/18 13:05:19
Overridden by InputDialogContainerTest.java
|
| double min, double max, double step) { |
| Calendar cal; |
| // |dialogValue|, |min|, |max| mean different things depending on the |dialogType|. |
| @@ -194,7 +193,7 @@ public class InputDialogContainer { |
| mDialog.show(); |
| } |
| - void showDialog(final int type, final double value, |
| + public void showDialog(final int type, final double value, |
|
ankit
2014/09/18 13:05:19
DateTimeChooserAndroid.java is using this method.
|
| double min, double max, double step, |
| DateTimeSuggestion[] suggestions) { |
| // When the web page asks to show a dialog while there is one already open, |
| @@ -207,7 +206,7 @@ public class InputDialogContainer { |
| } |
| } |
| - void showPickerDialog(final int dialogType, |
| + protected void showPickerDialog(final int dialogType, |
|
aurimas (slooooooooow)
2014/09/17 15:58:38
What is the reason for all the visibility (public/
ankit
2014/09/18 13:05:19
This funtions is overridden by InputDialogCotainer
|
| int year, int month, int monthDay, |
| int hourOfDay, int minute, int second, int millis, int week, |
| double min, double max, double step) { |