| 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 COMPONENTS_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_ANDROID_H_ | 5 #ifndef COMPONENTS_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_ANDROID_H_ |
| 6 #define COMPONENTS_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_ANDROID_H_ | 6 #define COMPONENTS_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_ANDROID_H_ |
| 7 | 7 |
| 8 #include "base/android/jni_weak_ref.h" | 8 #include "base/android/jni_weak_ref.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 namespace native_viewport { | 23 namespace native_viewport { |
| 24 | 24 |
| 25 class PlatformViewportAndroid : public PlatformViewport { | 25 class PlatformViewportAndroid : public PlatformViewport { |
| 26 public: | 26 public: |
| 27 static bool Register(JNIEnv* env); | 27 static bool Register(JNIEnv* env); |
| 28 | 28 |
| 29 explicit PlatformViewportAndroid(Delegate* delegate); | 29 explicit PlatformViewportAndroid(Delegate* delegate); |
| 30 ~PlatformViewportAndroid() override; | 30 ~PlatformViewportAndroid() override; |
| 31 | 31 |
| 32 void Destroy(JNIEnv* env, jobject obj); | 32 void Destroy(JNIEnv* env, jobject obj); |
| 33 void SurfaceCreated(JNIEnv* env, jobject obj, jobject jsurface); | 33 void SurfaceCreated(JNIEnv* env, |
| 34 jobject obj, |
| 35 jobject jsurface, |
| 36 float device_pixel_ratio); |
| 34 void SurfaceDestroyed(JNIEnv* env, jobject obj); | 37 void SurfaceDestroyed(JNIEnv* env, jobject obj); |
| 35 void SurfaceSetSize(JNIEnv* env, | 38 void SurfaceSetSize(JNIEnv* env, |
| 36 jobject obj, | 39 jobject obj, |
| 37 jint width, | 40 jint width, |
| 38 jint height, | 41 jint height, |
| 39 jfloat density); | 42 jfloat density); |
| 40 bool TouchEvent(JNIEnv* env, | 43 bool TouchEvent(JNIEnv* env, |
| 41 jobject obj, | 44 jobject obj, |
| 42 jlong time_ms, | 45 jlong time_ms, |
| 43 jint masked_action, | 46 jint masked_action, |
| (...skipping 30 matching lines...) Expand all Loading... |
| 74 ui::SequentialIDGenerator id_generator_; | 77 ui::SequentialIDGenerator id_generator_; |
| 75 | 78 |
| 76 base::WeakPtrFactory<PlatformViewportAndroid> weak_factory_; | 79 base::WeakPtrFactory<PlatformViewportAndroid> weak_factory_; |
| 77 | 80 |
| 78 DISALLOW_COPY_AND_ASSIGN(PlatformViewportAndroid); | 81 DISALLOW_COPY_AND_ASSIGN(PlatformViewportAndroid); |
| 79 }; | 82 }; |
| 80 | 83 |
| 81 } // namespace native_viewport | 84 } // namespace native_viewport |
| 82 | 85 |
| 83 #endif // COMPONENTS_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_ANDROID_H_ | 86 #endif // COMPONENTS_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_ANDROID_H_ |
| OLD | NEW |