Avi Drissman | 4a8573c | 2022-09-09 19:35:54 | [diff] [blame] | 1 | // Copyright 2022 The Chromium Authors |
François Beaufort | 4eb9a11e | 2022-05-17 09:28:28 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
Andrew Grieve | 6a66fe9 | 2024-05-29 15:36:02 | [diff] [blame] | 5 | #include "chrome/browser/usb/android/jni_headers/UsbBridge_jni.h" |
Francois Pierre Doray | 00b861a | 2024-05-29 16:08:24 | [diff] [blame^] | 6 | #include "content/public/browser/web_contents.h" |
Andrew Grieve | 6a66fe9 | 2024-05-29 15:36:02 | [diff] [blame] | 7 | |
François Beaufort | 4eb9a11e | 2022-05-17 09:28:28 | [diff] [blame] | 8 | jboolean JNI_UsbBridge_IsWebContentsConnectedToUsbDevice( |
| 9 | JNIEnv* env, |
| 10 | const base::android::JavaParamRef<jobject>& java_web_contents) { |
Matt Reynolds | ed00ca7e7 | 2022-08-18 20:56:20 | [diff] [blame] | 11 | return content::WebContents::FromJavaWebContents(java_web_contents) |
| 12 | ->IsConnectedToUsbDevice(); |
François Beaufort | 4eb9a11e | 2022-05-17 09:28:28 | [diff] [blame] | 13 | } |