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> |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 namespace ui { | 32 namespace ui { |
33 class WindowAndroid; | 33 class WindowAndroid; |
34 } | 34 } |
35 | 35 |
36 namespace content { | 36 namespace content { |
37 | 37 |
38 class GinJavaBridgeDispatcherHost; | 38 class GinJavaBridgeDispatcherHost; |
39 class RenderFrameHost; | 39 class RenderFrameHost; |
40 class RenderWidgetHostViewAndroid; | 40 class RenderWidgetHostViewAndroid; |
| 41 struct ContextMenuParams; |
41 struct MenuItem; | 42 struct MenuItem; |
42 | 43 |
43 class ContentViewCoreImpl : public ContentViewCore, | 44 class ContentViewCoreImpl : public ContentViewCore, |
44 public WebContentsObserver { | 45 public WebContentsObserver { |
45 public: | 46 public: |
46 static ContentViewCoreImpl* FromWebContents(WebContents* web_contents); | 47 static ContentViewCoreImpl* FromWebContents(WebContents* web_contents); |
47 ContentViewCoreImpl( | 48 ContentViewCoreImpl( |
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 |