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

Side by Side Diff: device/usb/usb_device_handle_android.cc

Issue 2209993003: Add missing using statements for JNI types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/usb_device_handle_android.h" 5 #include "device/usb/usb_device_handle_android.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "device/usb/usb_device.h" 9 #include "device/usb/usb_device.h"
10 #include "jni/ChromeUsbConnection_jni.h" 10 #include "jni/ChromeUsbConnection_jni.h"
11 11
12 using base::android::ScopedJavaLocalRef;
13
12 namespace device { 14 namespace device {
13 15
14 // static 16 // static
15 scoped_refptr<UsbDeviceHandleAndroid> UsbDeviceHandleAndroid::Create( 17 scoped_refptr<UsbDeviceHandleAndroid> UsbDeviceHandleAndroid::Create(
16 JNIEnv* env, 18 JNIEnv* env,
17 scoped_refptr<UsbDevice> device, 19 scoped_refptr<UsbDevice> device,
18 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner, 20 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner,
19 const base::android::JavaRef<jobject>& usb_connection) { 21 const base::android::JavaRef<jobject>& usb_connection) {
20 ScopedJavaLocalRef<jobject> wrapper = 22 ScopedJavaLocalRef<jobject> wrapper =
21 Java_ChromeUsbConnection_create(env, usb_connection.obj()); 23 Java_ChromeUsbConnection_create(env, usb_connection.obj());
(...skipping 19 matching lines...) Expand all
41 FROM_HERE, base::Bind(&UsbDeviceHandleAndroid::CloseConnection, this)); 43 FROM_HERE, base::Bind(&UsbDeviceHandleAndroid::CloseConnection, this));
42 } 44 }
43 45
44 void UsbDeviceHandleAndroid::CloseConnection() { 46 void UsbDeviceHandleAndroid::CloseConnection() {
45 JNIEnv* env = base::android::AttachCurrentThread(); 47 JNIEnv* env = base::android::AttachCurrentThread();
46 Java_ChromeUsbConnection_close(env, j_object_.obj()); 48 Java_ChromeUsbConnection_close(env, j_object_.obj());
47 j_object_.Reset(); 49 j_object_.Reset();
48 } 50 }
49 51
50 } // namespace device 52 } // namespace device
OLDNEW
« no previous file with comments | « device/power_save_blocker/power_save_blocker_android.cc ('k') | device/vr/android/cardboard/cardboard_vr_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698