1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_WEB_CONTENTS_DELEGATE_ANDROID_VALIDATION_MESSAGE_BUBBLE_ANDROID_H_
6 #define COMPONENTS_WEB_CONTENTS_DELEGATE_ANDROID_VALIDATION_MESSAGE_BUBBLE_ANDROID_H_
10 #include "base/android/scoped_java_ref.h"
11 #include "base/strings/string16.h"
18 class RenderWidgetHost
;
21 namespace web_contents_delegate_android
{
23 // An implementation of ValidationMessageBubble for Android. This class is a
24 // bridge to a Java implementation.
25 class ValidationMessageBubbleAndroid
{
27 ValidationMessageBubbleAndroid(content::RenderWidgetHost
* widget_host
,
28 const gfx::Rect
& anchor_in_screen
,
29 const base::string16
& main_text
,
30 const base::string16
& sub_text
);
31 virtual ~ValidationMessageBubbleAndroid();
32 virtual void SetPositionRelativeToAnchor(
33 content::RenderWidgetHost
* widget_host
,
34 const gfx::Rect
& anchor_in_screen
);
36 static bool Register(JNIEnv
* env
);
39 base::android::ScopedJavaGlobalRef
<jobject
> java_validation_message_bubble_
;
42 } // namespace web_contents_delegate_android
44 #endif // COMPONENTS_WEB_CONTENTS_DELEGATE_ANDROID_VALIDATION_MESSAGE_BUBBLE_ANDROID_H_