Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Side by Side Diff: content/public/browser/android/content_view_core.h

Issue 11428091: Migrate the Android compositor to cc::Layer classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "base/android/scoped_java_ref.h" 8 #include "base/android/scoped_java_ref.h"
9 #include <jni.h> 9 #include <jni.h>
10 10
11 #include "content/public/browser/navigation_controller.h" 11 #include "content/public/browser/navigation_controller.h"
12 12
13 namespace cc {
14 class Layer;
15 }
16
13 namespace gfx { 17 namespace gfx {
14 class Size; 18 class Size;
15 } 19 }
16 20
17 namespace ui { 21 namespace ui {
18 class WindowAndroid; 22 class WindowAndroid;
19 } 23 }
20 24
21 namespace WebKit {
22 class WebLayer;
23 }
24
25 namespace content { 25 namespace content {
26 class WebContents; 26 class WebContents;
27 27
28 // Native side of the ContentViewCore.java, which is the primary way of 28 // Native side of the ContentViewCore.java, which is the primary way of
29 // communicating with the native Chromium code on Android. This is a 29 // communicating with the native Chromium code on Android. This is a
30 // public interface used by native code outside of the content module. 30 // public interface used by native code outside of the content module.
31 class ContentViewCore { 31 class ContentViewCore {
32 public: 32 public:
33 // Returns the existing ContentViewCore for |web_contents|, or NULL. 33 // Returns the existing ContentViewCore for |web_contents|, or NULL.
34 static ContentViewCore* FromWebContents(WebContents* web_contents); 34 static ContentViewCore* FromWebContents(WebContents* web_contents);
35 static ContentViewCore* GetNativeContentViewCore(JNIEnv* env, jobject obj); 35 static ContentViewCore* GetNativeContentViewCore(JNIEnv* env, jobject obj);
36 36
37 virtual WebContents* GetWebContents() const = 0; 37 virtual WebContents* GetWebContents() const = 0;
38 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() = 0; 38 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() = 0;
39 virtual base::android::ScopedJavaLocalRef<jobject> GetContainerViewDelegate() 39 virtual base::android::ScopedJavaLocalRef<jobject> GetContainerViewDelegate()
40 = 0; 40 = 0;
41 virtual ui::WindowAndroid* GetWindowAndroid() const = 0; 41 virtual ui::WindowAndroid* GetWindowAndroid() const = 0;
42 virtual WebKit::WebLayer* GetWebLayer() const = 0; 42 virtual scoped_refptr<cc::Layer> GetLayer() const = 0;
43 virtual void LoadUrl(NavigationController::LoadURLParams& params) = 0; 43 virtual void LoadUrl(NavigationController::LoadURLParams& params) = 0;
44 virtual void OnWebPreferencesUpdated() = 0; 44 virtual void OnWebPreferencesUpdated() = 0;
45 virtual jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj) = 0; 45 virtual jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj) = 0;
46 virtual void ShowPastePopup(int x, int y) = 0; 46 virtual void ShowPastePopup(int x, int y) = 0;
47 virtual unsigned int GetScaledContentTexture(const gfx::Size& size) = 0; 47 virtual unsigned int GetScaledContentTexture(const gfx::Size& size) = 0;
48 48
49 protected: 49 protected:
50 virtual ~ContentViewCore() {}; 50 virtual ~ContentViewCore() {};
51 }; 51 };
52 52
53 }; // namespace content 53 }; // namespace content
54 54
55 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_ 55 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_
OLDNEW
« no previous file with comments | « content/public/browser/android/compositor.h ('k') | webkit/compositor_bindings/web_layer_tree_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698