| 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" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 void SetNeedsComposite(JNIEnv* env, jobject jobj); | 41 void SetNeedsComposite(JNIEnv* env, jobject jobj); |
| 42 void OnSurfaceChanged(JNIEnv* env, | 42 void OnSurfaceChanged(JNIEnv* env, |
| 43 jobject jobj, | 43 jobject jobj, |
| 44 jint format, | 44 jint format, |
| 45 jint width, | 45 jint width, |
| 46 jint height, | 46 jint height, |
| 47 jobject jsurface); | 47 jobject jsurface); |
| 48 void OnSurfaceCreated(JNIEnv* env, jobject jobj); | 48 void OnSurfaceCreated(JNIEnv* env, jobject jobj); |
| 49 void OnSurfaceDestroyed(JNIEnv* env, jobject jobj); | 49 void OnSurfaceDestroyed(JNIEnv* env, jobject jobj); |
| 50 void SetVisibility(JNIEnv* env, jobject jobj, jboolean visible); | 50 void SetVisibility(JNIEnv* env, jobject jobj, jboolean visible); |
| 51 jboolean OnTouchEvent(JNIEnv* env, |
| 52 jobject obj, |
| 53 jobject motion_event, |
| 54 jlong time_ms, |
| 55 jint android_action, |
| 56 jint pointer_count, |
| 57 jint history_size, |
| 58 jint action_index, |
| 59 jfloat pos_x_0, |
| 60 jfloat pos_y_0, |
| 61 jfloat pos_x_1, |
| 62 jfloat pos_y_1, |
| 63 jint pointer_id_0, |
| 64 jint pointer_id_1, |
| 65 jfloat touch_major_0, |
| 66 jfloat touch_major_1, |
| 67 jfloat touch_minor_0, |
| 68 jfloat touch_minor_1, |
| 69 jfloat orientation_0, |
| 70 jfloat orientation_1, |
| 71 jfloat tilt_0, |
| 72 jfloat tilt_1, |
| 73 jfloat raw_pos_x, |
| 74 jfloat raw_pos_y, |
| 75 jint android_tool_type_0, |
| 76 jint android_tool_type_1, |
| 77 jint android_button_state, |
| 78 jint android_meta_state); |
| 51 | 79 |
| 52 private: | 80 private: |
| 53 virtual ~BlimpView(); | 81 virtual ~BlimpView(); |
| 54 | 82 |
| 55 void ReleaseAcceleratedWidget(); | 83 void ReleaseAcceleratedWidget(); |
| 56 | 84 |
| 57 // Reference to the Java object which owns this class. | 85 // Reference to the Java object which owns this class. |
| 58 base::android::ScopedJavaGlobalRef<jobject> java_obj_; | 86 base::android::ScopedJavaGlobalRef<jobject> java_obj_; |
| 59 | 87 |
| 88 const float device_scale_factor_; |
| 89 |
| 60 scoped_ptr<BlimpCompositorAndroid> compositor_; | 90 scoped_ptr<BlimpCompositorAndroid> compositor_; |
| 61 | 91 |
| 62 // The format of the current surface owned by |compositor_|. See | 92 // The format of the current surface owned by |compositor_|. See |
| 63 // android.graphics.PixelFormat.java. | 93 // android.graphics.PixelFormat.java. |
| 64 int current_surface_format_; | 94 int current_surface_format_; |
| 65 | 95 |
| 66 gfx::AcceleratedWidget window_; | 96 gfx::AcceleratedWidget window_; |
| 67 | 97 |
| 68 DISALLOW_COPY_AND_ASSIGN(BlimpView); | 98 DISALLOW_COPY_AND_ASSIGN(BlimpView); |
| 69 }; | 99 }; |
| 70 | 100 |
| 71 } // namespace blimp | 101 } // namespace blimp |
| 72 | 102 |
| 73 #endif // BLIMP_CLIENT_ANDROID_BLIMP_VIEW_H_ | 103 #endif // BLIMP_CLIENT_ANDROID_BLIMP_VIEW_H_ |
| OLD | NEW |