Chromium Code Reviews| OLD | NEW | 
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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_CORE_CONTENTS_ANDROID_BLIMP_VIEW_H_ | |
| 6 #define BLIMP_CLIENT_CORE_CONTENTS_ANDROID_BLIMP_VIEW_H_ | |
| 7 | |
| 8 #include <jni.h> | |
| 9 | |
| 10 #include "base/android/jni_android.h" | |
| 11 #include "base/android/scoped_java_ref.h" | |
| 12 | |
| 13 namespace blimp { | |
| 14 namespace client { | |
| 15 | |
| 16 class BlimpContentsImpl; | |
| 17 | |
| 18 // The JNI bridge for the Java BlimpView that will visually represent the Blimp | |
| 
 
David Trainor- moved to gerrit
2016/08/30 21:14:06
it doesn't actually visually represent the content
 
nyquist
2016/08/30 21:50:42
Done. Thanks!
 
 | |
| 19 // rendered content. The Java object is created by constructed and owned by the | |
| 20 // native class. | |
| 21 class BlimpView { | |
| 22 public: | |
| 23 static bool RegisterJni(JNIEnv* env); | |
| 24 | |
| 25 // |blimp_contents_impl| must be the BlimpContentsImpl that this BlimpView is | |
| 26 // used for. | |
| 27 explicit BlimpView(BlimpContentsImpl* blimp_contents_impl); | |
| 28 ~BlimpView(); | |
| 29 | |
| 30 base::android::ScopedJavaLocalRef<jobject> GetJavaObject(); | |
| 31 | |
| 32 // Creates a new ViewAndroidDelegate for this view. | |
| 33 base::android::ScopedJavaLocalRef<jobject> CreateViewAndroidDelegate(); | |
| 34 | |
| 35 void OnSizeChanged(JNIEnv* env, | |
| 36 const base::android::JavaParamRef<jobject>& jobj, | |
| 37 jint width, | |
| 38 jint height, | |
| 39 jfloat device_scale_factor_dp_to_px); | |
| 40 | |
| 41 jboolean OnTouchEvent( | |
| 42 JNIEnv* env, | |
| 43 const base::android::JavaParamRef<jobject>& obj, | |
| 44 const base::android::JavaParamRef<jobject>& motion_event, | |
| 45 jlong time_ms, | |
| 46 jint android_action, | |
| 47 jint pointer_count, | |
| 48 jint history_size, | |
| 49 jint action_index, | |
| 50 jfloat pos_x_0, | |
| 51 jfloat pos_y_0, | |
| 52 jfloat pos_x_1, | |
| 53 jfloat pos_y_1, | |
| 54 jint pointer_id_0, | |
| 55 jint pointer_id_1, | |
| 56 jfloat touch_major_0, | |
| 57 jfloat touch_major_1, | |
| 58 jfloat touch_minor_0, | |
| 59 jfloat touch_minor_1, | |
| 60 jfloat orientation_0, | |
| 61 jfloat orientation_1, | |
| 62 jfloat tilt_0, | |
| 63 jfloat tilt_1, | |
| 64 jfloat raw_pos_x, | |
| 65 jfloat raw_pos_y, | |
| 66 jint android_tool_type_0, | |
| 67 jint android_tool_type_1, | |
| 68 jint android_button_state, | |
| 69 jint android_meta_state, | |
| 70 jfloat device_scale_factor_dp_to_px); | |
| 71 | |
| 72 private: | |
| 73 // The BlimpContentsImpl that this BlimpView is used for. | |
| 74 BlimpContentsImpl* blimp_contents_impl_; | |
| 75 | |
| 76 // The Java object for this BlimpView. | |
| 77 base::android::ScopedJavaGlobalRef<jobject> java_obj_; | |
| 78 | |
| 79 DISALLOW_COPY_AND_ASSIGN(BlimpView); | |
| 80 }; | |
| 81 | |
| 82 } // namespace client | |
| 83 } // namespace blimp | |
| 84 | |
| 85 #endif // BLIMP_CLIENT_CORE_CONTENTS_ANDROID_BLIMP_VIEW_H_ | |
| OLD | NEW |