| 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 MotionEvent(JNIEnv* env, jobject obj, jboolean is_touch, |
| 43 jint pointer_id, jint action, jfloat x, jfloat y, |
| 44 jlong time_ms); |
| 42 | 45 |
| 43 private: | 46 private: |
| 44 ~MojoViewport(); | 47 ~MojoViewport(); |
| 45 | 48 |
| 46 scoped_refptr<base::SingleThreadTaskRunner> ui_runner_; | 49 scoped_refptr<base::SingleThreadTaskRunner> ui_runner_; |
| 47 base::WeakPtr<NativeViewportAndroid> native_viewport_; | 50 base::WeakPtr<NativeViewportAndroid> native_viewport_; |
| 48 | 51 |
| 49 DISALLOW_COPY_AND_ASSIGN(MojoViewport); | 52 DISALLOW_COPY_AND_ASSIGN(MojoViewport); |
| 50 }; | 53 }; |
| 51 | 54 |
| 52 } // namespace services | 55 } // namespace services |
| 53 } // namespace mojo | 56 } // namespace mojo |
| 54 | 57 |
| 55 #endif // MOJO_SERVICES_NATIVE_VIEWPORT_ANDROID_MOJO_VIEWPORT_H_ | 58 #endif // MOJO_SERVICES_NATIVE_VIEWPORT_ANDROID_MOJO_VIEWPORT_H_ |
| OLD | NEW |