OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 MOJO_SERVICES_NATIVE_VIEWPORT_ANDROID_MOJO_VIEWPORT_H_ | 5 #ifndef MOJO_SERVICES_NATIVE_VIEWPORT_ANDROID_MOJO_VIEWPORT_H_ |
6 #define MOJO_SERVICES_NATIVE_VIEWPORT_ANDROID_MOJO_VIEWPORT_H_ | 6 #define MOJO_SERVICES_NATIVE_VIEWPORT_ANDROID_MOJO_VIEWPORT_H_ |
7 | 7 |
8 #include "base/android/jni_helper.h" | 8 #include "base/android/jni_helper.h" |
9 #include "base/android/scoped_java_ref.h" | 9 #include "base/android/scoped_java_ref.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 static void CreateForActivity( | 33 static void CreateForActivity( |
34 jobject activity, MojoViewportInit* init); | 34 jobject activity, MojoViewportInit* init); |
35 | 35 |
36 explicit MojoViewport(MojoViewportInit* init); | 36 explicit MojoViewport(MojoViewportInit* init); |
37 | 37 |
38 void Destroy(JNIEnv* env, jobject obj); | 38 void Destroy(JNIEnv* env, jobject obj); |
39 void SurfaceCreated(JNIEnv* env, jobject obj, jobject jsurface); | 39 void SurfaceCreated(JNIEnv* env, jobject obj, jobject jsurface); |
40 void SurfaceDestroyed(JNIEnv* env, jobject obj); | 40 void SurfaceDestroyed(JNIEnv* env, jobject obj); |
41 void SurfaceSetSize(JNIEnv* env, jobject obj, jint width, jint height); | 41 void SurfaceSetSize(JNIEnv* env, jobject obj, jint width, jint height); |
| 42 bool TouchEvent(JNIEnv* env, jobject obj, jint pointer_id, jint action, |
| 43 jfloat x, jfloat y, jlong time_ms); |
42 | 44 |
43 private: | 45 private: |
44 ~MojoViewport(); | 46 ~MojoViewport(); |
45 | 47 |
46 scoped_refptr<base::SingleThreadTaskRunner> ui_runner_; | 48 scoped_refptr<base::SingleThreadTaskRunner> ui_runner_; |
47 base::WeakPtr<NativeViewportAndroid> native_viewport_; | 49 base::WeakPtr<NativeViewportAndroid> native_viewport_; |
48 | 50 |
49 DISALLOW_COPY_AND_ASSIGN(MojoViewport); | 51 DISALLOW_COPY_AND_ASSIGN(MojoViewport); |
50 }; | 52 }; |
51 | 53 |
52 } // namespace services | 54 } // namespace services |
53 } // namespace mojo | 55 } // namespace mojo |
54 | 56 |
55 #endif // MOJO_SERVICES_NATIVE_VIEWPORT_ANDROID_MOJO_VIEWPORT_H_ | 57 #endif // MOJO_SERVICES_NATIVE_VIEWPORT_ANDROID_MOJO_VIEWPORT_H_ |
OLD | NEW |