Revert "Revert "Wire up resources for the Form Validation message bubble.""

This reverts commit 477b059d2035e22280f5ee2892d257b035cca32e.

Change-Id: I3cb22edb023bee31ebf66c166be9ca52eeb44420
diff --git a/chromium/java/com/android/webview/chromium/ResourceProvider.java b/chromium/java/com/android/webview/chromium/ResourceProvider.java
index e944710..7deed3d 100644
--- a/chromium/java/com/android/webview/chromium/ResourceProvider.java
+++ b/chromium/java/com/android/webview/chromium/ResourceProvider.java
@@ -103,6 +103,12 @@
         org.chromium.content.R.id.time_picker =
                 com.android.internal.R.id.webviewchromium_time_picker;
         org.chromium.content.R.id.year = com.android.internal.R.id.webviewchromium_year;
+        org.chromium.content.R.id.main_text =
+                com.android.internal.R.id.webviewchromium_validation_bubble_main_text;
+        org.chromium.content.R.id.sub_text =
+                com.android.internal.R.id.webviewchromium_validation_bubble_sub_text;
+        org.chromium.content.R.id.arrow_image =
+                com.android.internal.R.id.webviewchromium_validation_bubble_arrow_image;
 
         org.chromium.ui.R.id.selected_color_view =
                 com.android.internal.R.id.webviewchromium_color_picker_selected_color_view;
@@ -141,6 +147,8 @@
                 com.android.internal.R.layout.webviewchromium_two_field_date_picker;
         org.chromium.content.R.layout.multi_field_time_picker_dialog =
                 com.android.internal.R.layout.webviewchromium_multi_field_time_picker_dialog;
+        org.chromium.content.R.layout.validation_message_bubble =
+                com.android.internal.R.layout.webviewchromium_validation_message_bubble;
 
         org.chromium.ui.R.layout.color_picker_dialog_title =
                 com.android.internal.R.layout.webviewchromium_color_picker_dialog_title;
diff --git a/chromium/overlay/frameworks/base/core/res/res/drawable-hdpi/bubble.9.png b/chromium/overlay/frameworks/base/core/res/res/drawable-hdpi/bubble.9.png
new file mode 100644
index 0000000..905730f
--- /dev/null
+++ b/chromium/overlay/frameworks/base/core/res/res/drawable-hdpi/bubble.9.png
Binary files differ
diff --git a/chromium/overlay/frameworks/base/core/res/res/drawable-hdpi/bubble_arrow_up.png b/chromium/overlay/frameworks/base/core/res/res/drawable-hdpi/bubble_arrow_up.png
new file mode 100644
index 0000000..9f941a4
--- /dev/null
+++ b/chromium/overlay/frameworks/base/core/res/res/drawable-hdpi/bubble_arrow_up.png
Binary files differ
diff --git a/chromium/overlay/frameworks/base/core/res/res/drawable-hdpi/pageinfo_warning_major.png b/chromium/overlay/frameworks/base/core/res/res/drawable-hdpi/pageinfo_warning_major.png
new file mode 100644
index 0000000..081668f
--- /dev/null
+++ b/chromium/overlay/frameworks/base/core/res/res/drawable-hdpi/pageinfo_warning_major.png
Binary files differ
diff --git a/chromium/overlay/frameworks/base/core/res/res/drawable-xhdpi/bubble.9.png b/chromium/overlay/frameworks/base/core/res/res/drawable-xhdpi/bubble.9.png
new file mode 100644
index 0000000..c5d2e8f
--- /dev/null
+++ b/chromium/overlay/frameworks/base/core/res/res/drawable-xhdpi/bubble.9.png
Binary files differ
diff --git a/chromium/overlay/frameworks/base/core/res/res/drawable-xhdpi/bubble_arrow_up.png b/chromium/overlay/frameworks/base/core/res/res/drawable-xhdpi/bubble_arrow_up.png
new file mode 100644
index 0000000..0ec744c
--- /dev/null
+++ b/chromium/overlay/frameworks/base/core/res/res/drawable-xhdpi/bubble_arrow_up.png
Binary files differ
diff --git a/chromium/overlay/frameworks/base/core/res/res/drawable-xhdpi/pageinfo_warning_major.png b/chromium/overlay/frameworks/base/core/res/res/drawable-xhdpi/pageinfo_warning_major.png
new file mode 100644
index 0000000..9b9e312
--- /dev/null
+++ b/chromium/overlay/frameworks/base/core/res/res/drawable-xhdpi/pageinfo_warning_major.png
Binary files differ
diff --git a/chromium/overlay/frameworks/base/core/res/res/drawable/webviewchromium_bubble.9.png b/chromium/overlay/frameworks/base/core/res/res/drawable/webviewchromium_bubble.9.png
new file mode 100644
index 0000000..40588d2
--- /dev/null
+++ b/chromium/overlay/frameworks/base/core/res/res/drawable/webviewchromium_bubble.9.png
Binary files differ
diff --git a/chromium/overlay/frameworks/base/core/res/res/drawable/webviewchromium_bubble_arrow_up.png b/chromium/overlay/frameworks/base/core/res/res/drawable/webviewchromium_bubble_arrow_up.png
new file mode 100644
index 0000000..e1cbfa2
--- /dev/null
+++ b/chromium/overlay/frameworks/base/core/res/res/drawable/webviewchromium_bubble_arrow_up.png
Binary files differ
diff --git a/chromium/overlay/frameworks/base/core/res/res/drawable/webviewchromium_pageinfo_warning_major.png b/chromium/overlay/frameworks/base/core/res/res/drawable/webviewchromium_pageinfo_warning_major.png
new file mode 100644
index 0000000..26445cb
--- /dev/null
+++ b/chromium/overlay/frameworks/base/core/res/res/drawable/webviewchromium_pageinfo_warning_major.png
Binary files differ
diff --git a/chromium/overlay/frameworks/base/core/res/res/layout/webviewchromium_validation_message_bubble.xml b/chromium/overlay/frameworks/base/core/res/res/layout/webviewchromium_validation_message_bubble.xml
new file mode 100644
index 0000000..8510108
--- /dev/null
+++ b/chromium/overlay/frameworks/base/core/res/res/layout/webviewchromium_validation_message_bubble.xml
@@ -0,0 +1,71 @@
+<?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.
+-->
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:background="@drawable/webviewchromium_bubble">
+
+    <LinearLayout
+        android:id="@+id/webviewchromium_validation_bubble_top_view"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignStart="@+id/webviewchromium_validation_bubble_icon_view"
+        android:layout_alignEnd="@+id/webviewchromium_validation_bubble_text_wrapper"
+        android:weightSum="1">
+
+        <View
+            android:layout_width="0dp"
+            android:layout_height="0dp"
+            android:layout_weight="0.25"
+            android:visibility="invisible"/>
+
+        <ImageView
+            android:id="@+id/webviewchromium_validation_bubble_arrow_image"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentStart="true"
+            android:layout_marginBottom="7dp"
+            android:src="@drawable/webviewchromium_bubble_arrow_up" />
+
+    </LinearLayout>
+
+    <ImageView
+        android:id="@id/webviewchromium_validation_bubble_icon_view"
+        android:layout_width="19dp"
+        android:layout_height="19dp"
+        android:layout_alignParentStart="true"
+        android:layout_below="@id/webviewchromium_validation_bubble_top_view"
+        android:layout_marginEnd="8dp"
+        android:src="@drawable/webviewchromium_pageinfo_warning_major" />
+
+    <LinearLayout
+        android:id="@id/webviewchromium_validation_bubble_text_wrapper"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_below="@id/webviewchromium_validation_bubble_top_view"
+        android:layout_toEndOf="@id/webviewchromium_validation_bubble_icon_view"
+        android:orientation="vertical">
+
+        <TextView
+            android:id="@+id/webviewchromium_validation_bubble_main_text"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:maxWidth="300dp"
+            android:textColor="@android:color/black"
+            android:textSize="16sp" />
+
+        <TextView
+            android:id="@+id/webviewchromium_validation_bubble_sub_text"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:maxWidth="300dp"
+            android:textColor="#444"
+            android:textSize="13sp" />
+
+    </LinearLayout>
+
+</RelativeLayout>
diff --git a/chromium/overlay/frameworks/base/core/res/res/values/chromium-resources.xml b/chromium/overlay/frameworks/base/core/res/res/values/chromium-resources.xml
index 2bf853c..be88108 100644
--- a/chromium/overlay/frameworks/base/core/res/res/values/chromium-resources.xml
+++ b/chromium/overlay/frameworks/base/core/res/res/values/chromium-resources.xml
@@ -36,6 +36,9 @@
   <add-resource type="drawable" name="webviewchromium_color_button_background" />
   <add-resource type="drawable" name="webviewchromium_color_picker_border" />
   <add-resource type="drawable" name="webviewchromium_ondemand_overlay" />
+  <add-resource type="drawable" name="webviewchromium_bubble" />
+  <add-resource type="drawable" name="webviewchromium_bubble_arrow_up" />
+  <add-resource type="drawable" name="webviewchromium_pageinfo_warning_major" />
 
   <add-resource type="layout" name="webviewchromium_autofill_text" />
   <add-resource type="layout" name="webviewchromium_color_picker_advanced_component" />
@@ -45,8 +48,12 @@
   <add-resource type="layout" name="webviewchromium_date_time_suggestion" />
   <add-resource type="layout" name="webviewchromium_multi_field_time_picker_dialog" />
   <add-resource type="layout" name="webviewchromium_two_field_date_picker" />
+  <add-resource type="layout" name="webviewchromium_validation_message_bubble" />
 
   <add-resource type="id" name="webviewchromium_autofill_popup_window" />
+  <add-resource type="id" name="webviewchromium_validation_bubble_main_text" />
+  <add-resource type="id" name="webviewchromium_validation_bubble_sub_text" />
+  <add-resource type="id" name="webviewchromium_validation_bubble_arrow_image" />
 
   <add-resource type="string" name="webviewchromium_accessibility_content_view" />
   <add-resource type="string" name="webviewchromium_accessibility_date_picker_month" />
diff --git a/chromium/overlay/frameworks/base/core/res/res/values/chromium-symbols.xml b/chromium/overlay/frameworks/base/core/res/res/values/chromium-symbols.xml
index 761e38e..fd6ddb3 100644
--- a/chromium/overlay/frameworks/base/core/res/res/values/chromium-symbols.xml
+++ b/chromium/overlay/frameworks/base/core/res/res/values/chromium-symbols.xml
@@ -39,6 +39,9 @@
   <java-symbol type="drawable" name="webviewchromium_color_picker_advanced_select_handle" />
   <java-symbol type="drawable" name="webviewchromium_color_picker_border" />
   <java-symbol type="drawable" name="webviewchromium_ondemand_overlay" />
+  <java-symbol type="drawable" name="webviewchromium_bubble" />
+  <java-symbol type="drawable" name="webviewchromium_bubble_arrow_up" />
+  <java-symbol type="drawable" name="webviewchromium_pageinfo_warning_major" />
 
   <java-symbol type="layout" name="webviewchromium_autofill_text" />
   <java-symbol type="layout" name="webviewchromium_color_picker_advanced_component" />
@@ -48,6 +51,7 @@
   <java-symbol type="layout" name="webviewchromium_date_time_suggestion" />
   <java-symbol type="layout" name="webviewchromium_two_field_date_picker" />
   <java-symbol type="layout" name="webviewchromium_multi_field_time_picker_dialog" />
+  <java-symbol type="layout" name="webviewchromium_validation_message_bubble" />
 
   <java-symbol type="menu" name="webviewchromium_select_action_menu" />
 
@@ -142,6 +146,9 @@
   <java-symbol type="id" name="webviewchromium_select_action_menu_web_search" />
   <java-symbol type="id" name="webviewchromium_time_picker" />
   <java-symbol type="id" name="webviewchromium_year" />
+  <java-symbol type="id" name="webviewchromium_validation_bubble_main_text" />
+  <java-symbol type="id" name="webviewchromium_validation_bubble_sub_text" />
+  <java-symbol type="id" name="webviewchromium_validation_bubble_arrow_image" />
 
   <java-symbol type="style" name="webviewchromium_AutofillPopupWindow" />
   <java-symbol type="style" name="webviewchromium_SelectPopupDialog" />