diff options
Diffstat (limited to 'content/public')
12 files changed, 100 insertions, 1 deletions
diff --git a/content/public/android/java/res/drawable-hdpi/bubble.9.png b/content/public/android/java/res/drawable-hdpi/bubble.9.png Binary files differnew file mode 100644 index 0000000..905730f --- /dev/null +++ b/content/public/android/java/res/drawable-hdpi/bubble.9.png diff --git a/content/public/android/java/res/drawable-hdpi/bubble_arrow_up.png b/content/public/android/java/res/drawable-hdpi/bubble_arrow_up.png Binary files differnew file mode 100644 index 0000000..9f941a4 --- /dev/null +++ b/content/public/android/java/res/drawable-hdpi/bubble_arrow_up.png diff --git a/content/public/android/java/res/drawable-hdpi/pageinfo_warning_major.png b/content/public/android/java/res/drawable-hdpi/pageinfo_warning_major.png Binary files differnew file mode 100644 index 0000000..081668f --- /dev/null +++ b/content/public/android/java/res/drawable-hdpi/pageinfo_warning_major.png diff --git a/content/public/android/java/res/drawable-xhdpi/bubble.9.png b/content/public/android/java/res/drawable-xhdpi/bubble.9.png Binary files differnew file mode 100644 index 0000000..c5d2e8f --- /dev/null +++ b/content/public/android/java/res/drawable-xhdpi/bubble.9.png diff --git a/content/public/android/java/res/drawable-xhdpi/bubble_arrow_up.png b/content/public/android/java/res/drawable-xhdpi/bubble_arrow_up.png Binary files differnew file mode 100644 index 0000000..0ec744c --- /dev/null +++ b/content/public/android/java/res/drawable-xhdpi/bubble_arrow_up.png diff --git a/content/public/android/java/res/drawable-xhdpi/pageinfo_warning_major.png b/content/public/android/java/res/drawable-xhdpi/pageinfo_warning_major.png Binary files differnew file mode 100644 index 0000000..9b9e312 --- /dev/null +++ b/content/public/android/java/res/drawable-xhdpi/pageinfo_warning_major.png diff --git a/content/public/android/java/res/drawable/bubble.9.png b/content/public/android/java/res/drawable/bubble.9.png Binary files differnew file mode 100644 index 0000000..f3089cc --- /dev/null +++ b/content/public/android/java/res/drawable/bubble.9.png diff --git a/content/public/android/java/res/drawable/bubble_arrow_up.png b/content/public/android/java/res/drawable/bubble_arrow_up.png Binary files differnew file mode 100644 index 0000000..75d8e79 --- /dev/null +++ b/content/public/android/java/res/drawable/bubble_arrow_up.png diff --git a/content/public/android/java/res/drawable/pageinfo_warning_major.png b/content/public/android/java/res/drawable/pageinfo_warning_major.png Binary files differnew file mode 100644 index 0000000..82c9635 --- /dev/null +++ b/content/public/android/java/res/drawable/pageinfo_warning_major.png diff --git a/content/public/android/java/res/layout/validation_message_bubble.xml b/content/public/android/java/res/layout/validation_message_bubble.xml new file mode 100644 index 0000000..4e44be7 --- /dev/null +++ b/content/public/android/java/res/layout/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/bubble"> + + <LinearLayout + android:id="@+id/top_view" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignStart="@+id/icon_view" + android:layout_alignEnd="@+id/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/arrow_image" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentStart="true" + android:layout_marginBottom="7dp" + android:src="@drawable/bubble_arrow_up" /> + + </LinearLayout> + + <ImageView + android:id="@id/icon_view" + android:layout_width="19dp" + android:layout_height="19dp" + android:layout_alignParentStart="true" + android:layout_below="@id/top_view" + android:layout_marginEnd="8dp" + android:src="@drawable/pageinfo_warning_major" /> + + <LinearLayout + android:id="@id/text_wrapper" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_below="@id/top_view" + android:layout_toEndOf="@id/icon_view" + android:orientation="vertical"> + + <TextView + android:id="@+id/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/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/content/public/android/java/resource_map/org/chromium/content/R.java b/content/public/android/java/resource_map/org/chromium/content/R.java index ac39779..fec2cea 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 @@ -1,4 +1,4 @@ -// 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. @@ -16,22 +16,28 @@ package org.chromium.content; * com.android.internal.R. */ public final class R { + /** Attributes */ public static final class attr { public static int select_dialog_multichoice; public static int select_dialog_singlechoice; } + /** Dimensions */ public static final class dimen { public static int link_preview_overlay_radius; } + /** Drawables */ public static final class drawable { public static int ondemand_overlay; } + /** id */ public static final class id { public static int ampm; + public static int arrow_image; public static int date_picker; public static int date_time_suggestion_value; public static int date_time_suggestion_label; public static int hour; + public static int main_text; public static int milli; public static int minute; public static int pickers; @@ -45,18 +51,23 @@ public final class R { public static int select_action_menu_paste; public static int select_action_menu_share; public static int select_action_menu_web_search; + public static int sub_text; public static int time_picker; public static int year; } + /** 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 */ public static final class menu { public static int select_action_menu; } + /** strings */ public static final class string { public static int accessibility_content_view; public static int accessibility_date_picker_month; @@ -89,6 +100,7 @@ public final class R { public static int time_picker_dialog_title; public static int week_picker_dialog_title; } + /** styles */ public static final class style { public static int SelectPopupDialog; } diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h index 81faa6b..7f37194 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -451,6 +451,22 @@ class CONTENT_EXPORT WebContentsDelegate { virtual gfx::Size GetSizeForNewRenderView( const WebContents* web_contents) const; + // Notification that validation of a form displayed by the |web_contents| + // has failed. There can only be one message per |web_contents| at a time. + virtual void ShowValidationMessage(WebContents* web_contents, + const gfx::Rect& anchor_in_root_view, + const string16& main_text, + const string16& sub_text) {} + + // Notification that the delegate should hide any showing form validation + // message. + virtual void HideValidationMessage(WebContents* web_contents) {} + + // Notification that the form element that triggered the validation failure + // has moved. + virtual void MoveValidationMessage(WebContents* web_contents, + const gfx::Rect& anchor_in_root_view) {} + protected: virtual ~WebContentsDelegate(); |