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 | |
Francois Pierre Doray | 00b861a | 2024-05-29 16:08:24 | [diff] [blame] | 5 | #include "content/public/browser/web_contents.h" |
Andrew Grieve | 6a66fe9 | 2024-05-29 15:36:02 | [diff] [blame] | 6 | |
Andrew Grieve | ecb885bb | 2024-05-29 18:14:19 | [diff] [blame] | 7 | // Must come after all headers that specialize FromJniType() / ToJniType(). |
| 8 | #include "chrome/browser/usb/android/jni_headers/UsbBridge_jni.h" |
| 9 | |
François Beaufort | 4eb9a11e | 2022-05-17 09:28:28 | [diff] [blame] | 10 | jboolean JNI_UsbBridge_IsWebContentsConnectedToUsbDevice( |
| 11 | JNIEnv* env, |
| 12 | const base::android::JavaParamRef<jobject>& java_web_contents) { |
Matt Reynolds | ed00ca7e7 | 2022-08-18 20:56:20 | [diff] [blame] | 13 | return content::WebContents::FromJavaWebContents(java_web_contents) |
Patrick Monette | 15442a1 | 2025-01-22 20:09:31 | [diff] [blame] | 14 | ->IsCapabilityActive(content::WebContentsCapabilityType::kUSB); |
François Beaufort | 4eb9a11e | 2022-05-17 09:28:28 | [diff] [blame] | 15 | } |