OLD | NEW |
---|---|
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/android/jni_android.h" | 13 #include "base/android/jni_android.h" |
14 #include "base/android/jni_weak_ref.h" | 14 #include "base/android/jni_weak_ref.h" |
15 #include "base/android/scoped_java_ref.h" | 15 #include "base/android/scoped_java_ref.h" |
16 #include "base/compiler_specific.h" | 16 #include "base/compiler_specific.h" |
17 #include "base/i18n/rtl.h" | 17 #include "base/i18n/rtl.h" |
18 #include "base/macros.h" | 18 #include "base/macros.h" |
19 #include "base/process/process.h" | 19 #include "base/process/process.h" |
20 #include "content/browser/android/content_view_core_impl_observer.h" | 20 #include "content/browser/android/content_view_core_impl_observer.h" |
21 #include "content/browser/renderer_host/render_widget_host_view_android.h" | 21 #include "content/browser/renderer_host/render_widget_host_view_android.h" |
22 #include "content/browser/web_contents/web_contents_impl.h" | 22 #include "content/browser/web_contents/web_contents_impl.h" |
23 #include "content/public/browser/android/content_view_core.h" | 23 #include "content/public/browser/android/content_view_core.h" |
24 #include "content/public/browser/web_contents_observer.h" | 24 #include "content/public/browser/web_contents_observer.h" |
25 #include "content/public/common/context_menu_params.h" | |
boliu
2017/02/28 22:10:48
forward declare should be enough
| |
25 #include "third_party/WebKit/public/platform/WebInputEvent.h" | 26 #include "third_party/WebKit/public/platform/WebInputEvent.h" |
26 #include "ui/android/view_android.h" | 27 #include "ui/android/view_android.h" |
27 #include "ui/gfx/geometry/rect.h" | 28 #include "ui/gfx/geometry/rect.h" |
28 #include "ui/gfx/geometry/rect_f.h" | 29 #include "ui/gfx/geometry/rect_f.h" |
29 #include "ui/gfx/selection_bound.h" | 30 #include "ui/gfx/selection_bound.h" |
30 #include "url/gurl.h" | 31 #include "url/gurl.h" |
31 | 32 |
32 namespace ui { | 33 namespace ui { |
33 class WindowAndroid; | 34 class WindowAndroid; |
34 } | 35 } |
(...skipping 13 matching lines...) Expand all Loading... | |
48 JNIEnv* env, | 49 JNIEnv* env, |
49 const base::android::JavaRef<jobject>& obj, | 50 const base::android::JavaRef<jobject>& obj, |
50 WebContents* web_contents, | 51 WebContents* web_contents, |
51 float dpi_scale, | 52 float dpi_scale, |
52 const base::android::JavaRef<jobject>& java_bridge_retained_object_set); | 53 const base::android::JavaRef<jobject>& java_bridge_retained_object_set); |
53 | 54 |
54 // ContentViewCore implementation. | 55 // ContentViewCore implementation. |
55 base::android::ScopedJavaLocalRef<jobject> GetJavaObject() override; | 56 base::android::ScopedJavaLocalRef<jobject> GetJavaObject() override; |
56 WebContents* GetWebContents() const override; | 57 WebContents* GetWebContents() const override; |
57 ui::WindowAndroid* GetWindowAndroid() const override; | 58 ui::WindowAndroid* GetWindowAndroid() const override; |
58 void ShowPastePopup(int x, int y) override; | 59 bool ShowPastePopup(const ContextMenuParams& params) override; |
59 | 60 |
60 void AddObserver(ContentViewCoreImplObserver* observer); | 61 void AddObserver(ContentViewCoreImplObserver* observer); |
61 void RemoveObserver(ContentViewCoreImplObserver* observer); | 62 void RemoveObserver(ContentViewCoreImplObserver* observer); |
62 | 63 |
63 // -------------------------------------------------------------------------- | 64 // -------------------------------------------------------------------------- |
64 // Methods called from Java via JNI | 65 // Methods called from Java via JNI |
65 // -------------------------------------------------------------------------- | 66 // -------------------------------------------------------------------------- |
66 | 67 |
67 base::android::ScopedJavaLocalRef<jobject> GetWebContentsAndroid( | 68 base::android::ScopedJavaLocalRef<jobject> GetWebContentsAndroid( |
68 JNIEnv* env, | 69 JNIEnv* env, |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
446 scoped_refptr<GinJavaBridgeDispatcherHost> java_bridge_dispatcher_host_; | 447 scoped_refptr<GinJavaBridgeDispatcherHost> java_bridge_dispatcher_host_; |
447 | 448 |
448 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); | 449 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); |
449 }; | 450 }; |
450 | 451 |
451 bool RegisterContentViewCore(JNIEnv* env); | 452 bool RegisterContentViewCore(JNIEnv* env); |
452 | 453 |
453 } // namespace content | 454 } // namespace content |
454 | 455 |
455 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 456 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
OLD | NEW |