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

Unified Diff: chrome/browser/ui/android/validation_message_bubble_android.cc

Issue 16583005: Some improvement of validation message bubble UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/android/validation_message_bubble_android.cc
diff --git a/chrome/browser/ui/android/validation_message_bubble_android.cc b/chrome/browser/ui/android/validation_message_bubble_android.cc
index 8e7048c25803dd80b0ba3481fc649e3d7a7928c5..6cd9e1bb0e553e0ce99eb081e90fa7a9fe29aa77 100644
--- a/chrome/browser/ui/android/validation_message_bubble_android.cc
+++ b/chrome/browser/ui/android/validation_message_bubble_android.cc
@@ -27,7 +27,7 @@ inline ContentViewCore* GetContentViewCoreFrom(RenderWidgetHost* widget_host) {
ValidationMessageBubbleAndroid::ValidationMessageBubbleAndroid(
RenderWidgetHost* widget_host,
- const gfx::Rect& anchor_in_screen,
+ const gfx::Rect& anchor_in_root_view,
const string16& main_text,
const string16& sub_text) {
JNIEnv* env = base::android::AttachCurrentThread();
@@ -35,10 +35,10 @@ ValidationMessageBubbleAndroid::ValidationMessageBubbleAndroid(
Java_ValidationMessageBubble_createAndShow(
env,
GetContentViewCoreFrom(widget_host)->GetJavaObject().obj(),
- anchor_in_screen.x(),
- anchor_in_screen.y(),
- anchor_in_screen.width(),
- anchor_in_screen.height(),
+ anchor_in_root_view.x(),
+ anchor_in_root_view.y(),
+ anchor_in_root_view.width(),
+ anchor_in_root_view.height(),
ConvertUTF16ToJavaString(env, main_text).obj(),
ConvertUTF16ToJavaString(env, sub_text).obj()));
}
@@ -48,16 +48,16 @@ ValidationMessageBubbleAndroid::~ValidationMessageBubbleAndroid() {
java_validation_message_bubble_.obj());
}
-void ValidationMessageBubbleAndroid::MoveOnAnchor(
- RenderWidgetHost* widget_host, const gfx::Rect& anchor_in_screen) {
+void ValidationMessageBubbleAndroid::SetPositionRelativeToAnchor(
+ RenderWidgetHost* widget_host, const gfx::Rect& anchor_in_root_view) {
Java_ValidationMessageBubble_moveOnAnchor(
base::android::AttachCurrentThread(),
java_validation_message_bubble_.obj(),
GetContentViewCoreFrom(widget_host)->GetJavaObject().obj(),
- anchor_in_screen.x(),
- anchor_in_screen.y(),
- anchor_in_screen.width(),
- anchor_in_screen.height());
+ anchor_in_root_view.x(),
+ anchor_in_root_view.y(),
+ anchor_in_root_view.width(),
+ anchor_in_root_view.height());
}
// static
@@ -69,11 +69,11 @@ namespace chrome {
scoped_ptr<ValidationMessageBubble> ValidationMessageBubble::CreateAndShow(
RenderWidgetHost* widget_host,
- const gfx::Rect& anchor_in_screen,
+ const gfx::Rect& anchor_in_root_view,
const string16& main_text,
const string16& sub_text) {
return scoped_ptr<ValidationMessageBubble>(new ValidationMessageBubbleAndroid(
- widget_host, anchor_in_screen, main_text, sub_text)).Pass();
+ widget_host, anchor_in_root_view, main_text, sub_text)).Pass();
}
-}
+} // namespace chrome

Powered by Google App Engine
This is Rietveld 408576698