OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef BLIMP_CLIENT_ANDROID_BLIMP_VIEW_H_ | |
6 #define BLIMP_CLIENT_ANDROID_BLIMP_VIEW_H_ | |
7 | |
8 #include "base/android/jni_android.h" | |
9 #include "base/macros.h" | |
10 #include "base/memory/scoped_ptr.h" | |
11 | |
12 namespace gfx { | |
13 class Size; | |
14 } | |
15 | |
16 namespace blimp { | |
17 | |
18 class BlimpCompositor; | |
19 | |
20 class BlimpView { | |
nyquist
2015/08/19 07:48:06
Nit: Maybe a little comment here to clarify what t
David Trainor- moved to gerrit
2015/08/21 00:49:46
Done.
| |
21 public: | |
22 static bool RegisterJni(JNIEnv* env); | |
23 | |
24 BlimpView(JNIEnv* env, | |
25 jobject jobj, | |
26 const gfx::Size& physical_size, | |
27 const gfx::Size& display_size, | |
28 float dp_to_pixel); | |
29 | |
30 // JNI Methods | |
31 void Destroy(JNIEnv* env, jobject jobj); | |
32 void SetNeedsComposite(JNIEnv* env, jobject jobj); | |
33 void SurfaceChanged(JNIEnv* env, | |
34 jobject jobj, | |
35 jint format, | |
36 jint width, | |
37 jint height, | |
38 jobject jsurface); | |
39 void SurfaceCreated(JNIEnv* env, jobject jobj); | |
40 void SurfaceDestroyed(JNIEnv* env, jobject jobj); | |
41 void SetVisibility(JNIEnv* env, jobject jobj, jboolean visible); | |
42 | |
43 protected: | |
nyquist
2015/08/19 07:48:06
Nit: This seems unnecessary?
David Trainor- moved to gerrit
2015/08/21 00:49:46
Done.
| |
44 private: | |
45 virtual ~BlimpView(); | |
46 | |
47 base::android::ScopedJavaGlobalRef<jobject> java_obj_; | |
48 | |
49 scoped_ptr<BlimpCompositor> compositor_; | |
50 int current_surface_format_; | |
51 | |
52 DISALLOW_COPY_AND_ASSIGN(BlimpView); | |
53 }; | |
54 | |
55 } // namespace blimp | |
56 | |
57 #endif // BLIMP_CLIENT_ANDROID_BLIMP_VIEW_H_ | |
OLD | NEW |