OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_ |
6 #define CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 } | 24 } |
25 | 25 |
26 namespace ui { | 26 namespace ui { |
27 class WindowAndroid; | 27 class WindowAndroid; |
28 } | 28 } |
29 | 29 |
30 namespace content { | 30 namespace content { |
31 | 31 |
32 class WebContents; | 32 class WebContents; |
33 | 33 |
34 // Native side of the ContentViewCore.java, which is the primary way of | 34 // DEPRECATED. Do not add methods. |
35 // communicating with the native Chromium code on Android. This is a | 35 // Refer to the public WebContents interface or elsewhere instead. |
36 // public interface used by native code outside of the content module. | |
37 class CONTENT_EXPORT ContentViewCore { | 36 class CONTENT_EXPORT ContentViewCore { |
38 public: | 37 public: |
39 // Returns the existing ContentViewCore for |web_contents|, or nullptr. | 38 // Returns the existing ContentViewCore for |web_contents|, or nullptr. |
40 static ContentViewCore* FromWebContents(WebContents* web_contents); | 39 static ContentViewCore* FromWebContents(WebContents* web_contents); |
41 static ContentViewCore* GetNativeContentViewCore(JNIEnv* env, jobject obj); | |
42 | 40 |
43 virtual WebContents* GetWebContents() const = 0; | 41 virtual WebContents* GetWebContents() const = 0; |
44 | 42 |
45 // May return null reference. | 43 // May return null reference. |
46 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() = 0; | 44 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() = 0; |
47 virtual bool ShowPastePopup(int x, int y) = 0; | 45 virtual bool ShowPastePopup(int x, int y) = 0; |
48 | 46 |
49 virtual void PauseOrResumeGeolocation(bool should_pause) = 0; | 47 virtual void PauseOrResumeGeolocation(bool should_pause) = 0; |
50 | 48 |
51 virtual ui::WindowAndroid* GetWindowAndroid() const = 0; | 49 virtual ui::WindowAndroid* GetWindowAndroid() const = 0; |
52 virtual const base::android::JavaRef<jobject>& GetViewAndroidDelegate() | 50 virtual const base::android::JavaRef<jobject>& GetViewAndroidDelegate() |
53 const = 0; | 51 const = 0; |
54 virtual cc::Layer* GetLayer() const = 0; | |
55 | 52 |
56 protected: | 53 protected: |
57 ~ContentViewCore() {} | 54 ~ContentViewCore() {} |
58 }; | 55 }; |
59 | 56 |
60 }; // namespace content | 57 }; // namespace content |
61 | 58 |
62 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_ | 59 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_ |
OLD | NEW |