Fix experimental app list search box disappearing on profile switch.
[chromium-blink-merge.git] / components / web_contents_delegate_android / validation_message_bubble_android.h
blob181efc131a09a6c1dc8ef25d90535e706dfafb6c
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_
8 #include <jni.h>
10 #include "base/android/scoped_java_ref.h"
11 #include "base/strings/string16.h"
13 namespace gfx {
14 class Rect;
17 namespace content {
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 {
26 public:
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);
38 private:
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_