OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/browser/renderer_host/input/native_web_touch_event.h" |
| 6 |
| 7 #include "base/android/jni_android.h" |
| 8 #include "content/browser/renderer_host/input/web_input_event_builders_android.h
" |
| 9 |
| 10 namespace content { |
| 11 |
| 12 NativeWebTouchEvent::NativeWebTouchEvent(jobject android_motion_event, |
| 13 bool should_recycle, |
| 14 float device_scale_factor) |
| 15 : android_event(base::android::AttachCurrentThread(), |
| 16 android_motion_event, |
| 17 should_recycle), |
| 18 device_scale_factor(device_scale_factor) { |
| 19 WebTouchEvent::operator=( |
| 20 WebTouchEventBuilder::Build(android_event, device_scale_factor)); |
| 21 } |
| 22 |
| 23 NativeWebTouchEvent::NativeWebTouchEvent(const NativeWebTouchEvent& other) |
| 24 : WebTouchEvent(other), |
| 25 android_event(other.android_event), |
| 26 device_scale_factor(other.device_scale_factor) {} |
| 27 |
| 28 NativeWebTouchEvent::~NativeWebTouchEvent() {} |
| 29 |
| 30 NativeWebTouchEvent& NativeWebTouchEvent::operator=( |
| 31 const NativeWebTouchEvent& other) { |
| 32 WebTouchEvent::operator=(other); |
| 33 android_event = other.android_event; |
| 34 device_scale_factor = other.device_scale_factor; |
| 35 return *this; |
| 36 } |
| 37 |
| 38 } // namespace content |
OLD | NEW |