OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/web_contents_delegate_android/validation_message_bubble_and
roid.h" | 5 #include "components/web_contents_delegate_android/validation_message_bubble_and
roid.h" |
6 | 6 |
7 #include "base/android/jni_string.h" | 7 #include "base/android/jni_string.h" |
8 #include "content/public/browser/android/content_view_core.h" | 8 #include "content/public/browser/android/content_view_core.h" |
9 #include "content/public/browser/render_view_host.h" | 9 #include "content/public/browser/render_view_host.h" |
10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
11 #include "jni/ValidationMessageBubble_jni.h" | 11 #include "jni/ValidationMessageBubble_jni.h" |
12 #include "ui/gfx/rect.h" | 12 #include "ui/gfx/geometry/rect.h" |
13 | 13 |
14 using base::android::ConvertUTF16ToJavaString; | 14 using base::android::ConvertUTF16ToJavaString; |
15 using content::ContentViewCore; | 15 using content::ContentViewCore; |
16 using content::RenderWidgetHost; | 16 using content::RenderWidgetHost; |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 inline ContentViewCore* GetContentViewCoreFrom(RenderWidgetHost* widget_host) { | 20 inline ContentViewCore* GetContentViewCoreFrom(RenderWidgetHost* widget_host) { |
21 return ContentViewCore::FromWebContents( | 21 return ContentViewCore::FromWebContents( |
22 content::WebContents::FromRenderViewHost( | 22 content::WebContents::FromRenderViewHost( |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 anchor_in_root_view.width(), | 61 anchor_in_root_view.width(), |
62 anchor_in_root_view.height()); | 62 anchor_in_root_view.height()); |
63 } | 63 } |
64 | 64 |
65 // static | 65 // static |
66 bool ValidationMessageBubbleAndroid::Register(JNIEnv* env) { | 66 bool ValidationMessageBubbleAndroid::Register(JNIEnv* env) { |
67 return RegisterNativesImpl(env); | 67 return RegisterNativesImpl(env); |
68 } | 68 } |
69 | 69 |
70 } // namespace web_contents_delegate_android | 70 } // namespace web_contents_delegate_android |
OLD | NEW |