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 #include "services/native_viewport/platform_viewport_android.h" | 5 #include "services/native_viewport/platform_viewport_android.h" |
6 | 6 |
7 #include <android/input.h> | 7 #include <android/input.h> |
8 #include <android/native_window_jni.h> | 8 #include <android/native_window_jni.h> |
9 | 9 |
10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 jint pointer_id, | 107 jint pointer_id, |
108 jfloat x, | 108 jfloat x, |
109 jfloat y, | 109 jfloat y, |
110 jfloat pressure, | 110 jfloat pressure, |
111 jfloat touch_major, | 111 jfloat touch_major, |
112 jfloat touch_minor, | 112 jfloat touch_minor, |
113 jfloat orientation, | 113 jfloat orientation, |
114 jfloat h_wheel, | 114 jfloat h_wheel, |
115 jfloat v_wheel) { | 115 jfloat v_wheel) { |
116 mojo::EventPtr event(mojo::Event::New()); | 116 mojo::EventPtr event(mojo::Event::New()); |
| 117 event->time_stamp = time_ms; |
117 event->action = MotionEventActionToEventType(masked_action); | 118 event->action = MotionEventActionToEventType(masked_action); |
118 if (event->action == mojo::EVENT_TYPE_UNKNOWN) | 119 if (event->action == mojo::EVENT_TYPE_UNKNOWN) |
119 return false; | 120 return false; |
120 | 121 |
121 event->pointer_data = mojo::PointerData::New(); | 122 event->pointer_data = mojo::PointerData::New(); |
122 event->pointer_data->pointer_id = pointer_id; | 123 event->pointer_data->pointer_id = pointer_id; |
123 event->pointer_data->x = x; | 124 event->pointer_data->x = x; |
124 event->pointer_data->y = y; | 125 event->pointer_data->y = y; |
125 event->pointer_data->screen_x = x; | 126 event->pointer_data->screen_x = x; |
126 event->pointer_data->screen_y = y; | 127 event->pointer_data->screen_y = y; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 //////////////////////////////////////////////////////////////////////////////// | 199 //////////////////////////////////////////////////////////////////////////////// |
199 // PlatformViewport, public: | 200 // PlatformViewport, public: |
200 | 201 |
201 // static | 202 // static |
202 scoped_ptr<PlatformViewport> PlatformViewport::Create(Delegate* delegate) { | 203 scoped_ptr<PlatformViewport> PlatformViewport::Create(Delegate* delegate) { |
203 return scoped_ptr<PlatformViewport>( | 204 return scoped_ptr<PlatformViewport>( |
204 new PlatformViewportAndroid(delegate)).Pass(); | 205 new PlatformViewportAndroid(delegate)).Pass(); |
205 } | 206 } |
206 | 207 |
207 } // namespace native_viewport | 208 } // namespace native_viewport |
OLD | NEW |