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

Side by Side Diff: device/usb/android/usb_jni_registrar.cc

Issue 2146753002: Android: Remove unneeded RegisterNatives() calls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android: Don't require RegisterNatives if there are none Created 4 years, 4 months 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "device/usb/android/usb_jni_registrar.h" 5 #include "device/usb/android/usb_jni_registrar.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_registrar.h" 8 #include "base/android/jni_registrar.h"
9 #include "device/usb/usb_configuration_android.h"
10 #include "device/usb/usb_device_android.h"
11 #include "device/usb/usb_device_handle_android.h"
12 #include "device/usb/usb_endpoint_android.h"
13 #include "device/usb/usb_interface_android.h"
14 #include "device/usb/usb_service_android.h" 9 #include "device/usb/usb_service_android.h"
15 10
16 namespace device { 11 namespace device {
17 namespace android { 12 namespace android {
18 namespace { 13 namespace {
19 14
20 const base::android::RegistrationMethod kRegisteredMethods[] = { 15 const base::android::RegistrationMethod kRegisteredMethods[] = {
21 {"UsbConfigurationAndroid", device::UsbConfigurationAndroid::RegisterJNI},
22 {"UsbDeviceAndroid", device::UsbDeviceAndroid::RegisterJNI},
23 {"UsbDeviceHandleAndroid", device::UsbDeviceHandleAndroid::RegisterJNI},
24 {"UsbEndpointAndroid", device::UsbEndpointAndroid::RegisterJNI},
25 {"UsbInterfaceAndroid", device::UsbInterfaceAndroid::RegisterJNI},
26 {"UsbServiceAndroid", device::UsbServiceAndroid::RegisterJNI}, 16 {"UsbServiceAndroid", device::UsbServiceAndroid::RegisterJNI},
27 }; 17 };
28 18
29 } // namespace 19 } // namespace
30 20
31 bool RegisterUsbJni(JNIEnv* env) { 21 bool RegisterUsbJni(JNIEnv* env) {
32 return RegisterNativeMethods(env, kRegisteredMethods, 22 return RegisterNativeMethods(env, kRegisteredMethods,
33 arraysize(kRegisteredMethods)); 23 arraysize(kRegisteredMethods));
34 } 24 }
35 25
36 } // namespace android 26 } // namespace android
37 } // namespace device 27 } // namespace device
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698