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 SERVICES_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_ANDROID_H_ | 5 #ifndef SERVICES_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_ANDROID_H_ |
6 #define SERVICES_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_ANDROID_H_ | 6 #define SERVICES_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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 jint masked_action, | 43 jint masked_action, |
44 jint pointer_id, | 44 jint pointer_id, |
45 jfloat x, | 45 jfloat x, |
46 jfloat y, | 46 jfloat y, |
47 jfloat pressure, | 47 jfloat pressure, |
48 jfloat touch_major, | 48 jfloat touch_major, |
49 jfloat touch_minor, | 49 jfloat touch_minor, |
50 jfloat orientation, | 50 jfloat orientation, |
51 jfloat h_wheel, | 51 jfloat h_wheel, |
52 jfloat v_wheel); | 52 jfloat v_wheel); |
53 bool KeyEvent(JNIEnv* env, | |
54 jobject obj, | |
55 bool pressed, | |
56 jint key_code, | |
57 jint unicode_character); | |
58 | 53 |
59 private: | 54 private: |
60 // Overridden from PlatformViewport: | 55 // Overridden from PlatformViewport: |
61 virtual void Init(const gfx::Rect& bounds) override; | 56 virtual void Init(const gfx::Rect& bounds) override; |
62 virtual void Show() override; | 57 virtual void Show() override; |
63 virtual void Hide() override; | 58 virtual void Hide() override; |
64 virtual void Close() override; | 59 virtual void Close() override; |
65 virtual gfx::Size GetSize() override; | 60 virtual gfx::Size GetSize() override; |
66 virtual void SetBounds(const gfx::Rect& bounds) override; | 61 virtual void SetBounds(const gfx::Rect& bounds) override; |
67 | 62 |
68 void ReleaseWindow(); | 63 void ReleaseWindow(); |
69 | 64 |
70 Delegate* const delegate_; | 65 Delegate* const delegate_; |
71 JavaObjectWeakGlobalRef java_platform_viewport_android_; | 66 JavaObjectWeakGlobalRef java_platform_viewport_android_; |
72 ANativeWindow* window_; | 67 ANativeWindow* window_; |
73 mojo::ViewportMetricsPtr metrics_; | 68 mojo::ViewportMetricsPtr metrics_; |
74 ui::SequentialIDGenerator id_generator_; | 69 ui::SequentialIDGenerator id_generator_; |
75 | 70 |
76 base::WeakPtrFactory<PlatformViewportAndroid> weak_factory_; | 71 base::WeakPtrFactory<PlatformViewportAndroid> weak_factory_; |
77 | 72 |
78 DISALLOW_COPY_AND_ASSIGN(PlatformViewportAndroid); | 73 DISALLOW_COPY_AND_ASSIGN(PlatformViewportAndroid); |
79 }; | 74 }; |
80 | 75 |
81 } // namespace native_viewport | 76 } // namespace native_viewport |
82 | 77 |
83 #endif // SERVICES_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_ANDROID_H_ | 78 #endif // SERVICES_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_ANDROID_H_ |
OLD | NEW |