OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 BLIMP_CLIENT_ANDROID_BLIMP_VIEW_H_ | 5 #ifndef BLIMP_CLIENT_ANDROID_BLIMP_VIEW_H_ |
6 #define BLIMP_CLIENT_ANDROID_BLIMP_VIEW_H_ | 6 #define BLIMP_CLIENT_ANDROID_BLIMP_VIEW_H_ |
7 | 7 |
8 #include "base/android/jni_android.h" | 8 #include "base/android/jni_android.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "ui/gfx/native_widget_types.h" |
11 | 12 |
12 namespace gfx { | 13 namespace gfx { |
13 class Size; | 14 class Size; |
14 } | 15 } |
15 | 16 |
16 namespace blimp { | 17 namespace blimp { |
17 | 18 |
18 class BlimpCompositorAndroid; | 19 class BlimpCompositorAndroid; |
19 | 20 |
20 // The native component of org.chromium.blimp.BlimpView. This builds and | 21 // The native component of org.chromium.blimp.BlimpView. This builds and |
(...skipping 23 matching lines...) Expand all Loading... |
44 jint width, | 45 jint width, |
45 jint height, | 46 jint height, |
46 jobject jsurface); | 47 jobject jsurface); |
47 void OnSurfaceCreated(JNIEnv* env, jobject jobj); | 48 void OnSurfaceCreated(JNIEnv* env, jobject jobj); |
48 void OnSurfaceDestroyed(JNIEnv* env, jobject jobj); | 49 void OnSurfaceDestroyed(JNIEnv* env, jobject jobj); |
49 void SetVisibility(JNIEnv* env, jobject jobj, jboolean visible); | 50 void SetVisibility(JNIEnv* env, jobject jobj, jboolean visible); |
50 | 51 |
51 private: | 52 private: |
52 virtual ~BlimpView(); | 53 virtual ~BlimpView(); |
53 | 54 |
| 55 void ReleaseAcceleratedWidget(); |
| 56 |
54 // Reference to the Java object which owns this class. | 57 // Reference to the Java object which owns this class. |
55 base::android::ScopedJavaGlobalRef<jobject> java_obj_; | 58 base::android::ScopedJavaGlobalRef<jobject> java_obj_; |
56 | 59 |
57 scoped_ptr<BlimpCompositorAndroid> compositor_; | 60 scoped_ptr<BlimpCompositorAndroid> compositor_; |
58 | 61 |
59 // The format of the current surface owned by |compositor_|. See | 62 // The format of the current surface owned by |compositor_|. See |
60 // android.graphics.PixelFormat.java. | 63 // android.graphics.PixelFormat.java. |
61 int current_surface_format_; | 64 int current_surface_format_; |
62 | 65 |
| 66 gfx::AcceleratedWidget window_; |
| 67 |
63 DISALLOW_COPY_AND_ASSIGN(BlimpView); | 68 DISALLOW_COPY_AND_ASSIGN(BlimpView); |
64 }; | 69 }; |
65 | 70 |
66 } // namespace blimp | 71 } // namespace blimp |
67 | 72 |
68 #endif // BLIMP_CLIENT_ANDROID_BLIMP_VIEW_H_ | 73 #endif // BLIMP_CLIENT_ANDROID_BLIMP_VIEW_H_ |
OLD | NEW |