• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2013 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 "ui/base/touch/touch_device.h"
6 
7 #include "jni/TouchDevice_jni.h"
8 
9 namespace ui {
10 
IsTouchDevicePresent()11 bool IsTouchDevicePresent() {
12   return true;
13 }
14 
MaxTouchPoints()15 int MaxTouchPoints() {
16   JNIEnv* env = base::android::AttachCurrentThread();
17   jobject context = base::android::GetApplicationContext();
18   jint max_touch_points = Java_TouchDevice_maxTouchPoints(env, context);
19   return static_cast<int>(max_touch_points);
20 }
21 
RegisterTouchDeviceAndroid(JNIEnv * env)22 bool RegisterTouchDeviceAndroid(JNIEnv* env) {
23   return RegisterNativesImpl(env);
24 }
25 
26 }  // namespace ui
27