blob: cc0b8f1a860b4351ba4c2eee48a1f74d6e06bc01 [file] [log] [blame]
Avi Drissman4a8573c2022-09-09 19:35:541// Copyright 2022 The Chromium Authors
François Beaufort4eb9a11e2022-05-17 09:28:282// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Francois Pierre Doray00b861a2024-05-29 16:08:245#include "content/public/browser/web_contents.h"
Andrew Grieve6a66fe92024-05-29 15:36:026
Andrew Grieveecb885bb2024-05-29 18:14:197// Must come after all headers that specialize FromJniType() / ToJniType().
8#include "chrome/browser/usb/android/jni_headers/UsbBridge_jni.h"
9
François Beaufort4eb9a11e2022-05-17 09:28:2810jboolean JNI_UsbBridge_IsWebContentsConnectedToUsbDevice(
11 JNIEnv* env,
12 const base::android::JavaParamRef<jobject>& java_web_contents) {
Matt Reynoldsed00ca7e72022-08-18 20:56:2013 return content::WebContents::FromJavaWebContents(java_web_contents)
Patrick Monette15442a12025-01-22 20:09:3114 ->IsCapabilityActive(content::WebContentsCapabilityType::kUSB);
François Beaufort4eb9a11e2022-05-17 09:28:2815}