| OLD | NEW |
| (Empty) |
| 1 // Copyright 2017 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 UI_ANDROID_VIEW_ROOT_H_ | |
| 6 #define UI_ANDROID_VIEW_ROOT_H_ | |
| 7 | |
| 8 #include <jni.h> | |
| 9 | |
| 10 #include "base/android/scoped_java_ref.h" | |
| 11 #include "ui/android/ui_android_export.h" | |
| 12 #include "ui/android/view_android.h" | |
| 13 | |
| 14 namespace ui { | |
| 15 | |
| 16 // ViewRoot is the root of a ViewAndroid tree. | |
| 17 // TODO(jinsukkim): Hook this up to UI event forwarding flow and | |
| 18 // substitute WindowAndroid. See https://crbug.com/671401 | |
| 19 class UI_ANDROID_EXPORT ViewRoot : public ViewAndroid { | |
| 20 public: | |
| 21 explicit ViewRoot(jlong window_android_ptr); | |
| 22 | |
| 23 // ViewAndroid overrides. | |
| 24 WindowAndroid* GetWindowAndroid() const override; | |
| 25 ViewAndroid* GetViewRoot() override; | |
| 26 | |
| 27 void Destroy(JNIEnv* env, | |
| 28 const base::android::JavaParamRef<jobject>& obj); | |
| 29 | |
| 30 jboolean OnTouchEvent( | |
| 31 JNIEnv* env, | |
| 32 const base::android::JavaParamRef<jobject>& obj, | |
| 33 const base::android::JavaParamRef<jobject>& motion_event, | |
| 34 jlong time_ms, | |
| 35 jint android_action, | |
| 36 jint pointer_count, | |
| 37 jint history_size, | |
| 38 jint action_index, | |
| 39 jfloat pos_x_0, | |
| 40 jfloat pos_y_0, | |
| 41 jfloat pos_x_1, | |
| 42 jfloat pos_y_1, | |
| 43 jint pointer_id_0, | |
| 44 jint pointer_id_1, | |
| 45 jfloat touch_major_0, | |
| 46 jfloat touch_major_1, | |
| 47 jfloat touch_minor_0, | |
| 48 jfloat touch_minor_1, | |
| 49 jfloat orientation_0, | |
| 50 jfloat orientation_1, | |
| 51 jfloat tilt_0, | |
| 52 jfloat tilt_1, | |
| 53 jfloat raw_pos_x, | |
| 54 jfloat raw_pos_y, | |
| 55 jint android_tool_type_0, | |
| 56 jint android_tool_type_1, | |
| 57 jint android_button_state, | |
| 58 jint android_meta_state, | |
| 59 jboolean is_touch_handle_event); | |
| 60 | |
| 61 private: | |
| 62 WindowAndroid* window_; | |
| 63 | |
| 64 DISALLOW_COPY_AND_ASSIGN(ViewRoot); | |
| 65 }; | |
| 66 | |
| 67 bool RegisterViewRoot(JNIEnv* env); | |
| 68 | |
| 69 } // namespace ui | |
| 70 | |
| 71 #endif // UI_ANDROID_VIEW_ROOT_H_ | |
| OLD | NEW |