summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorankit2.kumar <ankit2.kumar@samsung.com>2014-09-24 21:20:47 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-25 04:21:06 +0000
commita91f4578e0de51430919d2982b906e59dcb227d3 (patch)
treea5e6b3c50e88d709ed8b91cff51b77a064c58b20
parent76e477470adbfe3fb1ff6a99ab5feeb4ac57c13c (diff)
downloadchromium_src-a91f4578e0de51430919d2982b906e59dcb227d3.zip
chromium_src-a91f4578e0de51430919d2982b906e59dcb227d3.tar.gz
chromium_src-a91f4578e0de51430919d2982b906e59dcb227d3.tar.bz2
Move *Picker.java and *PickerDialog.java to ui/android/java/...
There is no reason for the following files to live in content/ layer and they should all be moved to ui/ layer. BUG=302114 Review URL: https://codereview.chromium.org/574673003 Cr-Commit-Position: refs/heads/master@{#296637}
-rw-r--r--content/public/android/java/res/layout/multi_field_time_picker_dialog.xml122
-rw-r--r--content/public/android/java/resource_map/org/chromium/content/R.java14
-rw-r--r--content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java2
-rw-r--r--content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java1
-rw-r--r--content/public/android/java/strings/android_content_strings.grd69
-rw-r--r--content/public/android/javatests/src/org/chromium/content/browser/input/InputDialogContainerTest.java3
-rw-r--r--ui/android/java/res/layout/date_time_picker_dialog.xml (renamed from content/public/android/java/res/layout/date_time_picker_dialog.xml)2
-rw-r--r--ui/android/java/res/layout/multi_field_time_picker_dialog.xml122
-rw-r--r--ui/android/java/res/layout/two_field_date_picker.xml (renamed from content/public/android/java/res/layout/two_field_date_picker.xml)0
-rw-r--r--ui/android/java/resource_map/org/chromium/ui/R.java10
-rw-r--r--ui/android/java/src/org/chromium/ui/picker/ChromeDatePickerDialog.java (renamed from content/public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java)2
-rw-r--r--ui/android/java/src/org/chromium/ui/picker/DateDialogNormalizer.java (renamed from content/public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java)6
-rw-r--r--ui/android/java/src/org/chromium/ui/picker/DateTimePickerDialog.java (renamed from content/public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java)6
-rw-r--r--ui/android/java/src/org/chromium/ui/picker/DateTimeSuggestion.java (renamed from content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java)6
-rw-r--r--ui/android/java/src/org/chromium/ui/picker/DateTimeSuggestionListAdapter.java (renamed from content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java)4
-rw-r--r--ui/android/java/src/org/chromium/ui/picker/InputDialogContainer.java (renamed from content/public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java)27
-rw-r--r--ui/android/java/src/org/chromium/ui/picker/MonthPicker.java (renamed from content/public/android/java/src/org/chromium/content/browser/input/MonthPicker.java)4
-rw-r--r--ui/android/java/src/org/chromium/ui/picker/MonthPickerDialog.java (renamed from content/public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java)4
-rw-r--r--ui/android/java/src/org/chromium/ui/picker/MultiFieldTimePickerDialog.java (renamed from content/public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java)4
-rw-r--r--ui/android/java/src/org/chromium/ui/picker/OWNERS2
-rw-r--r--ui/android/java/src/org/chromium/ui/picker/TwoFieldDatePicker.java (renamed from content/public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java)4
-rw-r--r--ui/android/java/src/org/chromium/ui/picker/TwoFieldDatePickerDialog.java (renamed from content/public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java)8
-rw-r--r--ui/android/java/src/org/chromium/ui/picker/WeekPicker.java (renamed from content/public/android/java/src/org/chromium/content/browser/input/WeekPicker.java)4
-rw-r--r--ui/android/java/src/org/chromium/ui/picker/WeekPickerDialog.java (renamed from content/public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java)4
-rw-r--r--ui/android/java/strings/android_ui_strings.grd69
25 files changed, 250 insertions, 249 deletions
diff --git a/content/public/android/java/res/layout/multi_field_time_picker_dialog.xml b/content/public/android/java/res/layout/multi_field_time_picker_dialog.xml
deleted file mode 100644
index f149ef0..0000000
--- a/content/public/android/java/res/layout/multi_field_time_picker_dialog.xml
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright 2013 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.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
- android:orientation="vertical"
- android:gravity="start">
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/time_picker_dialog_title"
- android:textSize="20sp"
- android:paddingStart="5dp"
- android:paddingEnd="5dp"
- android:paddingBottom="5dp"
- android:paddingTop="5dp"
- android:gravity="start"
- android:textColor="#33B5E5"
- />
-
- <View
- android:layout_width="match_parent"
- android:layout_height="2dp"
- android:paddingBottom="5dp"
- android:paddingTop="5dp"
- android:background="#33B5E5"/>
-
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:orientation="horizontal"
- android:gravity="center">
-
- <NumberPicker
- android:id="@+id/hour"
- android:layout_width="0dp"
- android:layout_weight=".2"
- android:textSize="12sp"
- android:layout_height="wrap_content"
- android:layout_marginStart="4dp"
- android:layout_marginEnd="4dp"
- android:focusable="true"
- android:focusableInTouchMode="true"
- android:contentDescription="@string/accessibility_time_picker_hour"
- />
- <TextView
- android:layout_width="wrap_content"
- android:textSize="12sp"
- android:layout_height="wrap_content"
- android:text="@string/time_picker_dialog_hour_minute_separator"
- />
- <NumberPicker
- android:id="@+id/minute"
- android:layout_width="0dp"
- android:layout_weight=".2"
- android:textSize="12sp"
- android:layout_height="wrap_content"
- android:layout_marginStart="4dp"
- android:layout_marginEnd="4dp"
- android:focusable="true"
- android:focusableInTouchMode="true"
- android:contentDescription="@string/accessibility_time_picker_minute"
- />
- <TextView
- android:id="@+id/second_colon"
- android:layout_width="wrap_content"
- android:textSize="12sp"
- android:layout_height="wrap_content"
- android:text="@string/time_picker_dialog_minute_second_separator" />
- <NumberPicker
- android:id="@+id/second"
- android:layout_width="0dp"
- android:layout_weight=".2"
- android:textSize="12sp"
- android:layout_height="wrap_content"
- android:layout_marginStart="4dp"
- android:layout_marginEnd="4dp"
- android:focusable="true"
- android:focusableInTouchMode="true"
- android:contentDescription="@string/accessibility_time_picker_second"
- />
- <TextView
- android:id="@+id/second_dot"
- android:layout_width="wrap_content"
- android:textSize="12sp"
- android:layout_height="wrap_content"
- android:text="@string/time_picker_dialog_second_subsecond_separator"
- />
- <NumberPicker
- android:id="@+id/milli"
- android:layout_width="0dp"
- android:layout_weight=".2"
- android:textSize="12sp"
- android:layout_height="wrap_content"
- android:layout_marginStart="4dp"
- android:layout_marginEnd="4dp"
- android:focusable="true"
- android:focusableInTouchMode="true"
- android:contentDescription="@string/accessibility_time_picker_milli"
- />
- <NumberPicker
- android:id="@+id/ampm"
- android:layout_width="0dp"
- android:layout_weight=".2"
- android:textSize="12sp"
- android:layout_height="wrap_content"
- android:layout_marginStart="4dp"
- android:layout_marginEnd="4dp"
- android:focusable="true"
- android:focusableInTouchMode="true"
- android:contentDescription="@string/accessibility_time_picker_ampm"
- />
- </LinearLayout>
-</LinearLayout>
diff --git a/content/public/android/java/resource_map/org/chromium/content/R.java b/content/public/android/java/resource_map/org/chromium/content/R.java
index fec2cea..74ff861 100644
--- a/content/public/android/java/resource_map/org/chromium/content/R.java
+++ b/content/public/android/java/resource_map/org/chromium/content/R.java
@@ -57,10 +57,6 @@ public final class R {
}
/** layouts */
public static final class layout {
- public static int date_time_picker_dialog;
- public static int date_time_suggestion;
- public static int two_field_date_picker;
- public static int multi_field_time_picker_dialog;
public static int validation_message_bubble;
}
/** menus */
@@ -70,24 +66,16 @@ public final class R {
/** strings */
public static final class string {
public static int accessibility_content_view;
- public static int accessibility_date_picker_month;
- public static int accessibility_date_picker_week;
- public static int accessibility_date_picker_year;
public static int accessibility_datetime_picker_date;
public static int accessibility_datetime_picker_time;
public static int actionbar_share;
public static int actionbar_web_search;
- public static int date_picker_dialog_clear;
- public static int date_picker_dialog_set;
- public static int date_picker_dialog_title;
- public static int date_picker_dialog_other_button_label;
public static int date_time_picker_dialog_title;
public static int media_player_error_button;
public static int media_player_error_text_invalid_progressive_playback;
public static int media_player_error_text_unknown;
public static int media_player_error_title;
public static int media_player_loading_video;
- public static int month_picker_dialog_title;
public static int profiler_error_toast;
public static int profiler_no_storage_toast;
public static int profiler_started_toast;
@@ -97,8 +85,6 @@ public final class R {
public static int time_picker_dialog_minute_second_separator;
public static int time_picker_dialog_second_subsecond_separator;
public static int time_picker_dialog_pm;
- public static int time_picker_dialog_title;
- public static int week_picker_dialog_title;
}
/** styles */
public static final class style {
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java b/content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java
index a8642ec..a673d32 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java
+++ b/content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java
@@ -9,6 +9,8 @@ import android.content.Context;
import org.chromium.base.CalledByNative;
import org.chromium.base.JNINamespace;
import org.chromium.content.browser.ContentViewCore;
+import org.chromium.ui.picker.DateTimeSuggestion;
+import org.chromium.ui.picker.InputDialogContainer;
/**
* Plumbing for the different date/time dialog adapters.
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java b/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
index 25fb337..f7a5891 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
+++ b/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
@@ -22,6 +22,7 @@ import java.lang.CharSequence;
import org.chromium.base.CalledByNative;
import org.chromium.base.JNINamespace;
import org.chromium.base.VisibleForTesting;
+import org.chromium.ui.picker.InputDialogContainer;
/**
* Adapts and plumbs android IME service onto the chrome text input API.
diff --git a/content/public/android/java/strings/android_content_strings.grd b/content/public/android/java/strings/android_content_strings.grd
index b8c9481..ecb927c 100644
--- a/content/public/android/java/strings/android_content_strings.grd
+++ b/content/public/android/java/strings/android_content_strings.grd
@@ -102,75 +102,6 @@
<message desc="Content description for the content view that holds the web contents [CHAR-LIMIT=32]" name="IDS_ACCESSIBILITY_CONTENT_VIEW">
Web View
</message>
- <message desc="Title for the date picker dialog, which can be used to choose a date. [CHAR-LIMIT=32]" name="IDS_DATE_PICKER_DIALOG_TITLE">
- Set date
- </message>
- <message desc="Label for 'set' button in date picker dialog and time picker dialog, used to replace the contents of a field with the chosen date or time [CHAR-LIMIT=12]" name="IDS_DATE_PICKER_DIALOG_SET">
- Set
- </message>
- <message desc="Label for 'clear' button in date picker dialog and time picker dialog, used to replace the contents of a field with the empty string [CHAR-LIMIT=12]" name="IDS_DATE_PICKER_DIALOG_CLEAR">
- Clear
- </message>
- <message desc="Label for 'other' button in date picker dialog and time picker dialog, used to close the list of suggestions and open the the full date/time picker [CHAR-LIMIT=32]" name="IDS_DATE_PICKER_DIALOG_OTHER_BUTTON_LABEL">
- Other
- </message>
- <message desc="Title for the date/time picker dialog, which can be used to choose a date and time. [CHAR-LIMIT=32]" name="IDS_DATE_TIME_PICKER_DIALOG_TITLE">
- Set date and time
- </message>
- <message desc="Title for the time picker dialog, which can be used to choose a time. [CHAR-LIMIT=32]" name="IDS_TIME_PICKER_DIALOG_TITLE">
- Set time
- </message>
- <message desc="Value for AM in AM/PM in the time picker dialog. AM represents the morning (ante-meridiem). [CHAR-LIMIT=12]" name="IDS_TIME_PICKER_DIALOG_AM">
- AM
- </message>
- <message desc="Value for PM in AM/PM in the time picker dialog. PM represents the afternoon (post-meridiem). [CHAR-LIMIT=12]" name="IDS_TIME_PICKER_DIALOG_PM">
- PM
- </message>
- <message desc="Separator used between hours and minutes in the time pickerr dialog (hh:mm) [CHAR-LIMIT=1]" name="IDS_TIME_PICKER_DIALOG_HOUR_MINUTE_SEPARATOR">
- :
- </message>
- <message desc="Separator used between minutes and seconds in the time picker dialog (hh:mm:ss) [CHAR-LIMIT=1]" name="IDS_TIME_PICKER_DIALOG_MINUTE_SECOND_SEPARATOR">
- :
- </message>
- <message desc="Separator used between seconds and subseconds in the time picker dialog (hh:mm:ss.sss) [CHAR-LIMIT=1]" name="IDS_TIME_PICKER_DIALOG_SECOND_SUBSECOND_SEPARATOR">
- .
- </message>
- <message desc="Title for the month picker dialog, which can be used to choose a month. [CHAR-LIMIT=32]" name="IDS_MONTH_PICKER_DIALOG_TITLE">
- Set month
- </message>
- <message desc="Title for the week picker dialog, which can be used to choose a week. [CHAR-LIMIT=32]" name="IDS_WEEK_PICKER_DIALOG_TITLE">
- Set week
- </message>
- <message desc="Content description for the date time picker date component. [CHAR-LIMIT=32]" name="IDS_ACCESSIBILITY_DATETIME_PICKER_DATE">
- Date
- </message>
- <message desc="Content description for the date time picker time component. [CHAR-LIMIT=32]" name="IDS_ACCESSIBILITY_DATETIME_PICKER_TIME">
- Time
- </message>
- <message desc="Content description for the date time picker month component. [CHAR-LIMIT=32]" name="IDS_ACCESSIBILITY_DATE_PICKER_MONTH">
- Month
- </message>
- <message desc="Content description for the date time picker week component. [CHAR-LIMIT=32]" name="IDS_ACCESSIBILITY_DATE_PICKER_WEEK">
- Week
- </message>
- <message desc="Content description for the date time picker year component. [CHAR-LIMIT=32]" name="IDS_ACCESSIBILITY_DATE_PICKER_YEAR">
- Year
- </message>
- <message desc="Content description for the time picker hour component. [CHAR-LIMIT=32]" name="IDS_ACCESSIBILITY_TIME_PICKER_HOUR">
- Hour
- </message>
- <message desc="Content description for the time picker minute component. [CHAR-LIMIT=32]" name="IDS_ACCESSIBILITY_TIME_PICKER_MINUTE">
- Minute
- </message>
- <message desc="Content description for the time picker second component. [CHAR-LIMIT=32]" name="IDS_ACCESSIBILITY_TIME_PICKER_SECOND">
- Second
- </message>
- <message desc="Content description for the time picker milli component. [CHAR-LIMIT=32]" name="IDS_ACCESSIBILITY_TIME_PICKER_MILLI">
- Millisecond
- </message>
- <message desc="Content description for the time picker AM/PM component. [CHAR-LIMIT=32]" name="IDS_ACCESSIBILITY_TIME_PICKER_AMPM">
- AM/PM
- </message>
<message desc="NO DESCRIPTION [CHAR-LIMIT=32]" name="IDS_MEDIA_PLAYER_ERROR_TITLE">
Cannot play video
</message>
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/input/InputDialogContainerTest.java b/content/public/android/javatests/src/org/chromium/content/browser/input/InputDialogContainerTest.java
index aafef35..46aea21 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/input/InputDialogContainerTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/input/InputDialogContainerTest.java
@@ -9,6 +9,7 @@ import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
import org.chromium.base.test.util.Feature;
+import org.chromium.ui.picker.InputDialogContainer;
public class InputDialogContainerTest extends AndroidTestCase {
private static final int TEXT_INPUT_TYPE_DATE = 0;
@@ -373,7 +374,7 @@ public class InputDialogContainerTest extends AndroidTestCase {
}
@Override
- void showPickerDialog(final int dialogType,
+ protected void showPickerDialog(final int dialogType,
int year, int month, int monthDay,
int hourOfDay, int minute, int second, int millis, int week,
double min, double max, double step) {
diff --git a/content/public/android/java/res/layout/date_time_picker_dialog.xml b/ui/android/java/res/layout/date_time_picker_dialog.xml
index ddc0c5e..a021753 100644
--- a/content/public/android/java/res/layout/date_time_picker_dialog.xml
+++ b/ui/android/java/res/layout/date_time_picker_dialog.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2012 The Chromium Authors. All rights reserved.
+<!-- Copyright 2012 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.
diff --git a/ui/android/java/res/layout/multi_field_time_picker_dialog.xml b/ui/android/java/res/layout/multi_field_time_picker_dialog.xml
new file mode 100644
index 0000000..e037a09
--- /dev/null
+++ b/ui/android/java/res/layout/multi_field_time_picker_dialog.xml
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright 2013 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:orientation="vertical"
+ android:gravity="start">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/time_picker_dialog_title"
+ android:textSize="20sp"
+ android:paddingStart="5dp"
+ android:paddingEnd="5dp"
+ android:paddingBottom="5dp"
+ android:paddingTop="5dp"
+ android:gravity="start"
+ android:textColor="#33B5E5"
+ />
+
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="2dp"
+ android:paddingBottom="5dp"
+ android:paddingTop="5dp"
+ android:background="#33B5E5"/>
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:orientation="horizontal"
+ android:gravity="center">
+
+ <NumberPicker
+ android:id="@+id/hour"
+ android:layout_width="0dp"
+ android:layout_weight=".2"
+ android:textSize="12sp"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="4dp"
+ android:layout_marginEnd="4dp"
+ android:focusable="true"
+ android:focusableInTouchMode="true"
+ android:contentDescription="@string/accessibility_time_picker_hour"
+ />
+ <TextView
+ android:layout_width="wrap_content"
+ android:textSize="12sp"
+ android:layout_height="wrap_content"
+ android:text="@string/time_picker_dialog_hour_minute_separator"
+ />
+ <NumberPicker
+ android:id="@+id/minute"
+ android:layout_width="0dp"
+ android:layout_weight=".2"
+ android:textSize="12sp"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="4dp"
+ android:layout_marginEnd="4dp"
+ android:focusable="true"
+ android:focusableInTouchMode="true"
+ android:contentDescription="@string/accessibility_time_picker_minute"
+ />
+ <TextView
+ android:id="@+id/second_colon"
+ android:layout_width="wrap_content"
+ android:textSize="12sp"
+ android:layout_height="wrap_content"
+ android:text="@string/time_picker_dialog_minute_second_separator" />
+ <NumberPicker
+ android:id="@+id/second"
+ android:layout_width="0dp"
+ android:layout_weight=".2"
+ android:textSize="12sp"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="4dp"
+ android:layout_marginEnd="4dp"
+ android:focusable="true"
+ android:focusableInTouchMode="true"
+ android:contentDescription="@string/accessibility_time_picker_second"
+ />
+ <TextView
+ android:id="@+id/second_dot"
+ android:layout_width="wrap_content"
+ android:textSize="12sp"
+ android:layout_height="wrap_content"
+ android:text="@string/time_picker_dialog_second_subsecond_separator"
+ />
+ <NumberPicker
+ android:id="@+id/milli"
+ android:layout_width="0dp"
+ android:layout_weight=".2"
+ android:textSize="12sp"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="4dp"
+ android:layout_marginEnd="4dp"
+ android:focusable="true"
+ android:focusableInTouchMode="true"
+ android:contentDescription="@string/accessibility_time_picker_milli"
+ />
+ <NumberPicker
+ android:id="@+id/ampm"
+ android:layout_width="0dp"
+ android:layout_weight=".2"
+ android:textSize="12sp"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="4dp"
+ android:layout_marginEnd="4dp"
+ android:focusable="true"
+ android:focusableInTouchMode="true"
+ android:contentDescription="@string/accessibility_time_picker_ampm"
+ />
+ </LinearLayout>
+</LinearLayout>
diff --git a/content/public/android/java/res/layout/two_field_date_picker.xml b/ui/android/java/res/layout/two_field_date_picker.xml
index 0660251..0660251 100644
--- a/content/public/android/java/res/layout/two_field_date_picker.xml
+++ b/ui/android/java/res/layout/two_field_date_picker.xml
diff --git a/ui/android/java/resource_map/org/chromium/ui/R.java b/ui/android/java/resource_map/org/chromium/ui/R.java
index b2e2b7b..1cce99d 100644
--- a/ui/android/java/resource_map/org/chromium/ui/R.java
+++ b/ui/android/java/resource_map/org/chromium/ui/R.java
@@ -16,6 +16,9 @@ package org.chromium.ui;
*/
public final class R {
public static final class string {
+ public static int accessibility_date_picker_month;
+ public static int accessibility_date_picker_year;
+ public static int accessibility_date_picker_week;
public static int copy_to_clipboard_failure_message;
public static int low_memory_error;
public static int opening_file_error;
@@ -34,6 +37,13 @@ public final class R {
public static int color_picker_button_yellow;
public static int color_picker_button_black;
public static int color_picker_button_white;
+ public static int date_picker_dialog_set;
+ public static int date_picker_dialog_other_button_label;
+ public static int date_picker_dialog_clear;
+ public static int date_picker_dialog_title;
+ public static int month_picker_dialog_title;
+ public static int time_picker_dialog_title;
+ public static int week_picker_dialog_title;
}
public static final class id {
public static int dropdown_label;
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java b/ui/android/java/src/org/chromium/ui/picker/ChromeDatePickerDialog.java
index 8e7987b..f236ee1 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java
+++ b/ui/android/java/src/org/chromium/ui/picker/ChromeDatePickerDialog.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.picker;
import android.content.Context;
import android.content.DialogInterface;
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java b/ui/android/java/src/org/chromium/ui/picker/DateDialogNormalizer.java
index 709d0e7..25a7495 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java
+++ b/ui/android/java/src/org/chromium/ui/picker/DateDialogNormalizer.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.picker;
import android.widget.DatePicker;
import android.widget.DatePicker.OnDateChangedListener;
@@ -13,7 +13,7 @@ import java.util.TimeZone;
/**
* Normalize a date dialog so that it respect min and max.
*/
-class DateDialogNormalizer {
+public class DateDialogNormalizer {
private static void setLimits(DatePicker picker, long minMillis, long maxMillis) {
// DatePicker intervals are non inclusive, the DatePicker will throw an
@@ -56,7 +56,7 @@ class DateDialogNormalizer {
* Normalizes an existing DateDialogPicker changing the default date if
* needed to comply with the {@code min} and {@code max} attributes.
*/
- static void normalize(DatePicker picker, OnDateChangedListener listener,
+ public static void normalize(DatePicker picker, OnDateChangedListener listener,
int year, int month, int day, int hour, int minute, long minMillis, long maxMillis) {
Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
calendar.clear();
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java b/ui/android/java/src/org/chromium/ui/picker/DateTimePickerDialog.java
index c52090b..c9dde07 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java
+++ b/ui/android/java/src/org/chromium/ui/picker/DateTimePickerDialog.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.picker;
import android.app.AlertDialog;
import android.content.Context;
@@ -16,9 +16,9 @@ import android.widget.DatePicker.OnDateChangedListener;
import android.widget.TimePicker;
import android.widget.TimePicker.OnTimeChangedListener;
-import org.chromium.content.R;
+import org.chromium.ui.R;
-class DateTimePickerDialog extends AlertDialog implements OnClickListener,
+public class DateTimePickerDialog extends AlertDialog implements OnClickListener,
OnDateChangedListener, OnTimeChangedListener {
private final DatePicker mDatePicker;
private final TimePicker mTimePicker;
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java b/ui/android/java/src/org/chromium/ui/picker/DateTimeSuggestion.java
index e46b58e..4c81468 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java
+++ b/ui/android/java/src/org/chromium/ui/picker/DateTimeSuggestion.java
@@ -2,13 +2,13 @@
// 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.picker;
/**
* Date/time suggestion container used to store information for each suggestion that will be shown
* in the suggestion list dialog. Keep in sync with date_time_suggestion.h.
*/
-class DateTimeSuggestion {
+public class DateTimeSuggestion {
private final double mValue;
private final String mLocalizedValue;
private final String mLabel;
@@ -19,7 +19,7 @@ class DateTimeSuggestion {
* @param localizedValue The suggested value localized.
* @param label The label for the suggestion.
*/
- DateTimeSuggestion(double value, String localizedValue, String label) {
+ public DateTimeSuggestion(double value, String localizedValue, String label) {
mValue = value;
mLocalizedValue = localizedValue;
mLabel = label;
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java b/ui/android/java/src/org/chromium/ui/picker/DateTimeSuggestionListAdapter.java
index 5a8d200..c7a166c 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java
+++ b/ui/android/java/src/org/chromium/ui/picker/DateTimeSuggestionListAdapter.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.picker;
import android.content.Context;
import android.view.LayoutInflater;
@@ -11,7 +11,7 @@ import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;
-import org.chromium.content.R;
+import org.chromium.ui.R;
import java.util.List;
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java b/ui/android/java/src/org/chromium/ui/picker/InputDialogContainer.java
index 49123b2..797e03b 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java
+++ b/ui/android/java/src/org/chromium/ui/picker/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.picker;
import android.app.AlertDialog;
import android.app.DatePickerDialog.OnDateSetListener;
@@ -16,9 +16,9 @@ import android.widget.DatePicker;
import android.widget.ListView;
import android.widget.TimePicker;
-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.R;
+import org.chromium.ui.picker.DateTimePickerDialog.OnDateTimeSetListener;
+import org.chromium.ui.picker.MultiFieldTimePickerDialog.OnMultiFieldTimeSetListener;
import java.util.Arrays;
import java.util.Calendar;
@@ -28,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 {
void cancelDateTimeDialog();
void replaceDateTime(double value);
}
@@ -52,7 +52,7 @@ public class InputDialogContainer {
private AlertDialog mDialog;
private final InputActionDelegate mInputActionDelegate;
- static void initializeInputTypes(int textInputTypeDate,
+ public static void initializeInputTypes(int textInputTypeDate,
int textInputTypeDateTime, int textInputTypeDateTimeLocal,
int textInputTypeMonth, int textInputTypeTime,
int textInputTypeWeek) {
@@ -64,18 +64,18 @@ public class InputDialogContainer {
sTextInputTypeWeek = textInputTypeWeek;
}
- static boolean isDialogInputType(int type) {
+ public static boolean isDialogInputType(int type) {
return type == sTextInputTypeDate || type == sTextInputTypeTime
|| type == sTextInputTypeDateTime || type == sTextInputTypeDateTimeLocal
|| type == sTextInputTypeMonth || type == sTextInputTypeWeek;
}
- InputDialogContainer(Context context, InputActionDelegate inputActionDelegate) {
+ public InputDialogContainer(Context context, InputActionDelegate inputActionDelegate) {
mContext = context;
mInputActionDelegate = inputActionDelegate;
}
- void showPickerDialog(final int dialogType, double dialogValue,
+ public void showPickerDialog(final int dialogType, double dialogValue,
double min, double max, double step) {
Calendar cal;
// |dialogValue|, |min|, |max| mean different things depending on the |dialogType|.
@@ -193,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,
double min, double max, double step,
DateTimeSuggestion[] suggestions) {
// When the web page asks to show a dialog while there is one already open,
@@ -206,7 +206,7 @@ public class InputDialogContainer {
}
}
- void showPickerDialog(final int dialogType,
+ protected void showPickerDialog(final int dialogType,
int year, int month, int monthDay,
int hourOfDay, int minute, int second, int millis, int week,
double min, double max, double step) {
@@ -249,8 +249,7 @@ public class InputDialogContainer {
mDialog.setButton(DialogInterface.BUTTON_POSITIVE,
mContext.getText(R.string.date_picker_dialog_set),
- (DialogInterface.OnClickListener) mDialog);
-
+ (DialogInterface.OnClickListener)mDialog);
mDialog.setButton(DialogInterface.BUTTON_NEGATIVE,
mContext.getText(android.R.string.cancel),
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/MonthPicker.java b/ui/android/java/src/org/chromium/ui/picker/MonthPicker.java
index 593aa00..416217c 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/MonthPicker.java
+++ b/ui/android/java/src/org/chromium/ui/picker/MonthPicker.java
@@ -2,11 +2,11 @@
// 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.picker;
import android.content.Context;
-import org.chromium.content.R;
+import org.chromium.ui.R;
import java.text.DateFormatSymbols;
import java.util.Arrays;
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java b/ui/android/java/src/org/chromium/ui/picker/MonthPickerDialog.java
index 40f45b9..58aafa6 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java
+++ b/ui/android/java/src/org/chromium/ui/picker/MonthPickerDialog.java
@@ -2,11 +2,11 @@
// 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.picker;
import android.content.Context;
-import org.chromium.content.R;
+import org.chromium.ui.R;
public class MonthPickerDialog extends TwoFieldDatePickerDialog {
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java b/ui/android/java/src/org/chromium/ui/picker/MultiFieldTimePickerDialog.java
index e415a62..860829f 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java
+++ b/ui/android/java/src/org/chromium/ui/picker/MultiFieldTimePickerDialog.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.picker;
import android.app.AlertDialog;
import android.content.Context;
@@ -12,7 +12,7 @@ import android.view.LayoutInflater;
import android.view.View;
import android.widget.NumberPicker;
-import org.chromium.content.R;
+import org.chromium.ui.R;
import java.util.ArrayList;
diff --git a/ui/android/java/src/org/chromium/ui/picker/OWNERS b/ui/android/java/src/org/chromium/ui/picker/OWNERS
new file mode 100644
index 0000000..a4238ac
--- /dev/null
+++ b/ui/android/java/src/org/chromium/ui/picker/OWNERS
@@ -0,0 +1,2 @@
+aurimas@chromium.org
+miguelg@chromium.org
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java b/ui/android/java/src/org/chromium/ui/picker/TwoFieldDatePicker.java
index 8730e81..4e84683 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java
+++ b/ui/android/java/src/org/chromium/ui/picker/TwoFieldDatePicker.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.picker;
import android.content.Context;
import android.text.format.DateUtils;
@@ -12,7 +12,7 @@ import android.widget.FrameLayout;
import android.widget.NumberPicker;
import android.widget.NumberPicker.OnValueChangeListener;
-import org.chromium.content.R;
+import org.chromium.ui.R;
import java.util.Calendar;
import java.util.TimeZone;
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java b/ui/android/java/src/org/chromium/ui/picker/TwoFieldDatePickerDialog.java
index 1e84dee..e3f01e7 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java
+++ b/ui/android/java/src/org/chromium/ui/picker/TwoFieldDatePickerDialog.java
@@ -2,15 +2,15 @@
// 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.picker;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
-import org.chromium.content.R;
-import org.chromium.content.browser.input.TwoFieldDatePicker.OnMonthOrWeekChangedListener;
+import org.chromium.ui.R;
+import org.chromium.ui.picker.TwoFieldDatePicker.OnMonthOrWeekChangedListener;
public abstract class TwoFieldDatePickerDialog extends AlertDialog implements OnClickListener,
OnMonthOrWeekChangedListener {
@@ -19,7 +19,7 @@ public abstract class TwoFieldDatePickerDialog extends AlertDialog implements On
private static final String POSITION_IN_YEAR = "position_in_year";
protected final TwoFieldDatePicker mPicker;
- protected final OnValueSetListener mCallBack;
+ protected final OnValueSetListener mCallBack;
/**
* The callback used to indicate the user is done filling in the date.
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/WeekPicker.java b/ui/android/java/src/org/chromium/ui/picker/WeekPicker.java
index a53460f..bb9a25d 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/WeekPicker.java
+++ b/ui/android/java/src/org/chromium/ui/picker/WeekPicker.java
@@ -2,11 +2,11 @@
// 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.picker;
import android.content.Context;
-import org.chromium.content.R;
+import org.chromium.ui.R;
import java.util.Calendar;
import java.util.TimeZone;
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java b/ui/android/java/src/org/chromium/ui/picker/WeekPickerDialog.java
index 0a7240e26..e769c1a 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java
+++ b/ui/android/java/src/org/chromium/ui/picker/WeekPickerDialog.java
@@ -2,11 +2,11 @@
// 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.picker;
import android.content.Context;
-import org.chromium.content.R;
+import org.chromium.ui.R;
public class WeekPickerDialog extends TwoFieldDatePickerDialog {
diff --git a/ui/android/java/strings/android_ui_strings.grd b/ui/android/java/strings/android_ui_strings.grd
index 2ad816e..c2a42a5 100644
--- a/ui/android/java/strings/android_ui_strings.grd
+++ b/ui/android/java/strings/android_ui_strings.grd
@@ -147,6 +147,75 @@
<message desc="Notification for when copying to the clipboard fails. [CHAR-LIMIT=64]" name="IDS_COPY_TO_CLIPBOARD_FAILURE_MESSAGE">
Failed to copy to the clipboard
</message>
+ <message desc="Content description for the date time picker month component. [CHAR-LIMIT=32]" name="IDS_ACCESSIBILITY_DATE_PICKER_MONTH">
+ Month
+ </message>
+ <message desc="Content description for the date time picker year component. [CHAR-LIMIT=32]" name="IDS_ACCESSIBILITY_DATE_PICKER_YEAR">
+ Year
+ </message>
+ <message desc="Label for 'set' button in date picker dialog and time picker dialog, used to replace the contents of a field with the chosen date or time [CHAR-LIMIT=12]" name="IDS_DATE_PICKER_DIALOG_SET">
+ Set
+ </message>
+ <message desc="Title for the month picker dialog, which can be used to choose a month. [CHAR-LIMIT=32]" name="IDS_MONTH_PICKER_DIALOG_TITLE">
+ Set month
+ </message>
+ <message desc="Content description for the date time picker week component. [CHAR-LIMIT=32]" name="IDS_ACCESSIBILITY_DATE_PICKER_WEEK">
+ Week
+ </message>
+ <message desc="Title for the week picker dialog, which can be used to choose a week. [CHAR-LIMIT=32]" name="IDS_WEEK_PICKER_DIALOG_TITLE">
+ Set week
+ </message>
+ <message desc="Value for AM in AM/PM in the time picker dialog. AM represents the morning (ante-meridiem). [CHAR-LIMIT=12]" name="IDS_TIME_PICKER_DIALOG_AM">
+ AM
+ </message>
+ <message desc="Value for PM in AM/PM in the time picker dialog. PM represents the afternoon (post-meridiem). [CHAR-LIMIT=12]" name="IDS_TIME_PICKER_DIALOG_PM">
+ PM
+ </message>
+ <message desc="Title for the time picker dialog, which can be used to choose a time. [CHAR-LIMIT=32]" name="IDS_TIME_PICKER_DIALOG_TITLE">
+ Set time
+ </message>
+ <message desc="Content description for the time picker hour component. [CHAR-LIMIT=32]" name="IDS_ACCESSIBILITY_TIME_PICKER_HOUR">
+ Hour
+ </message>
+ <message desc="Content description for the time picker minute component. [CHAR-LIMIT=32]" name="IDS_ACCESSIBILITY_TIME_PICKER_MINUTE">
+ Minute
+ </message>
+ <message desc="Content description for the time picker second component. [CHAR-LIMIT=32]" name="IDS_ACCESSIBILITY_TIME_PICKER_SECOND">
+ Second
+ </message>
+ <message desc="Content description for the time picker milli component. [CHAR-LIMIT=32]" name="IDS_ACCESSIBILITY_TIME_PICKER_MILLI">
+ Millisecond
+ </message>
+ <message desc="Content description for the time picker AM/PM component. [CHAR-LIMIT=32]" name="IDS_ACCESSIBILITY_TIME_PICKER_AMPM">
+ AM/PM
+ </message>
+ <message desc="Separator used between hours and minutes in the time pickerr dialog (hh:mm) [CHAR-LIMIT=1]" name="IDS_TIME_PICKER_DIALOG_HOUR_MINUTE_SEPARATOR">
+ :
+ </message>
+ <message desc="Separator used between minutes and seconds in the time picker dialog (hh:mm:ss) [CHAR-LIMIT=1]" name="IDS_TIME_PICKER_DIALOG_MINUTE_SECOND_SEPARATOR">
+ :
+ </message>
+ <message desc="Separator used between seconds and subseconds in the time picker dialog (hh:mm:ss.sss) [CHAR-LIMIT=1]" name="IDS_TIME_PICKER_DIALOG_SECOND_SUBSECOND_SEPARATOR">
+ .
+ </message>
+ <message desc="Title for the date/time picker dialog, which can be used to choose a date and time. [CHAR-LIMIT=32]" name="IDS_DATE_TIME_PICKER_DIALOG_TITLE">
+ Set date and time
+ </message>
+ <message desc="Content description for the date time picker date component. [CHAR-LIMIT=32]" name="IDS_ACCESSIBILITY_DATETIME_PICKER_DATE">
+ Date
+ </message>
+ <message desc="Content description for the date time picker time component. [CHAR-LIMIT=32]" name="IDS_ACCESSIBILITY_DATETIME_PICKER_TIME">
+ Time
+ </message>
+ <message desc="Label for 'other' button in date picker dialog and time picker dialog, used to close the list of suggestions and open the the full date/time picker [CHAR-LIMIT=32]" name="IDS_DATE_PICKER_DIALOG_OTHER_BUTTON_LABEL">
+ Other
+ </message>
+ <message desc="Title for the date picker dialog, which can be used to choose a date. [CHAR-LIMIT=32]" name="IDS_DATE_PICKER_DIALOG_TITLE">
+ Set date
+ </message>
+ <message desc="Label for 'clear' button in date picker dialog and time picker dialog, used to replace the contents of a field with the empty string [CHAR-LIMIT=12]" name="IDS_DATE_PICKER_DIALOG_CLEAR">
+ Clear
+ </message>
</messages>
</release>
</grit>