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_BROWSER_ANDROID_CONTENT_VIEW_RENDER_VIEW_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_CONTENT_VIEW_RENDER_VIEW_H_ |
6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_RENDER_VIEW_H_ | 6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_RENDER_VIEW_H_ |
7 | 7 |
8 #include "base/android/jni_weak_ref.h" | 8 #include "base/android/jni_weak_ref.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 const base::android::JavaParamRef<jobject>& obj); | 41 const base::android::JavaParamRef<jobject>& obj); |
42 void SurfaceChanged(JNIEnv* env, | 42 void SurfaceChanged(JNIEnv* env, |
43 const base::android::JavaParamRef<jobject>& obj, | 43 const base::android::JavaParamRef<jobject>& obj, |
44 jint format, | 44 jint format, |
45 jint width, | 45 jint width, |
46 jint height, | 46 jint height, |
47 const base::android::JavaParamRef<jobject>& surface); | 47 const base::android::JavaParamRef<jobject>& surface); |
48 void SetOverlayVideoMode(JNIEnv* env, | 48 void SetOverlayVideoMode(JNIEnv* env, |
49 const base::android::JavaParamRef<jobject>& obj, | 49 const base::android::JavaParamRef<jobject>& obj, |
50 bool enabled); | 50 bool enabled); |
51 void SetNeedsComposite(JNIEnv* env, | |
52 const base::android::JavaParamRef<jobject>& obj); | |
53 | |
54 // TODO(yusufo): Remove this once the compositor code is | |
55 // refactored to use a unified system. | |
56 jlong GetUIResourceProvider(JNIEnv* env, | |
57 const base::android::JavaParamRef<jobject>& obj); | |
58 | 51 |
59 // CompositorClient implementation | 52 // CompositorClient implementation |
60 void UpdateLayerTreeHost() override; | 53 void UpdateLayerTreeHost() override; |
61 void OnSwapBuffersCompleted(int pending_swap_buffers) override; | 54 void OnSwapBuffersCompleted(int pending_swap_buffers) override; |
62 | 55 |
63 private: | 56 private: |
64 ~ContentViewRenderView() override; | 57 ~ContentViewRenderView() override; |
65 | 58 |
66 void InitCompositor(); | 59 void InitCompositor(); |
67 | 60 |
68 base::android::ScopedJavaGlobalRef<jobject> java_obj_; | 61 base::android::ScopedJavaGlobalRef<jobject> java_obj_; |
69 | 62 |
70 scoped_ptr<content::Compositor> compositor_; | 63 scoped_ptr<content::Compositor> compositor_; |
71 | 64 |
72 gfx::NativeWindow root_window_; | 65 gfx::NativeWindow root_window_; |
73 int current_surface_format_; | 66 int current_surface_format_; |
74 | 67 |
75 DISALLOW_COPY_AND_ASSIGN(ContentViewRenderView); | 68 DISALLOW_COPY_AND_ASSIGN(ContentViewRenderView); |
76 }; | 69 }; |
77 | 70 |
78 | 71 |
79 | 72 |
80 } | 73 } |
81 | 74 |
82 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_RENDER_VIEW_H_ | 75 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_RENDER_VIEW_H_ |
OLD | NEW |