Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: ui/events/android/motion_event_android.cc

Issue 1430623004: blimp: Add support for input handling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/renderer_host/input/motion_event_android.h" 5 #include "ui/events/android/motion_event_android.h"
6 6
7 #include <android/input.h> 7 #include <android/input.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 10
11 #include "base/android/jni_android.h" 11 #include "base/android/jni_android.h"
12 #include "jni/MotionEvent_jni.h" 12 #include "jni/MotionEvent_jni.h"
13 #include "ui/events/base_event_utils.h" 13 #include "ui/events/base_event_utils.h"
14 #include "ui/events/event_constants.h" 14 #include "ui/events/event_constants.h"
15 15
16 using base::android::AttachCurrentThread; 16 using base::android::AttachCurrentThread;
17 using namespace JNI_MotionEvent; 17 using namespace JNI_MotionEvent;
18 18
19 namespace content { 19 namespace ui {
20 namespace { 20 namespace {
21 21
22 MotionEventAndroid::Action FromAndroidAction(int android_action) { 22 MotionEventAndroid::Action FromAndroidAction(int android_action) {
23 switch (android_action) { 23 switch (android_action) {
24 case ACTION_DOWN: 24 case ACTION_DOWN:
25 return MotionEventAndroid::ACTION_DOWN; 25 return MotionEventAndroid::ACTION_DOWN;
26 case ACTION_UP: 26 case ACTION_UP:
27 return MotionEventAndroid::ACTION_UP; 27 return MotionEventAndroid::ACTION_UP;
28 case ACTION_MOVE: 28 case ACTION_MOVE:
29 return MotionEventAndroid::ACTION_MOVE; 29 return MotionEventAndroid::ACTION_MOVE;
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 result.tool_type = FromAndroidToolType(pointer.tool_type); 339 result.tool_type = FromAndroidToolType(pointer.tool_type);
340 return result; 340 return result;
341 } 341 }
342 342
343 // static 343 // static
344 bool MotionEventAndroid::RegisterMotionEventAndroid(JNIEnv* env) { 344 bool MotionEventAndroid::RegisterMotionEventAndroid(JNIEnv* env) {
345 return JNI_MotionEvent::RegisterNativesImpl(env); 345 return JNI_MotionEvent::RegisterNativesImpl(env);
346 } 346 }
347 347
348 } // namespace content 348 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698