#include "content/public/browser/web_contents.h"
#include "chrome/browser/bluetooth/android/jni_headers/BluetoothBridge_jni.h"
static jboolean JNI_BluetoothBridge_IsWebContentsConnectedToBluetoothDevice(
JNIEnv* env,
const base::android::JavaParamRef<jobject>& java_web_contents) {
content::WebContents* web_contents =
content::WebContents::FromJavaWebContents(java_web_contents);
return web_contents->IsCapabilityActive(
content::WebContentsCapabilityType::kBluetoothConnected);
}
static jboolean JNI_BluetoothBridge_IsWebContentsScanningForBluetoothDevices(
JNIEnv* env,
const base::android::JavaParamRef<jobject>& java_web_contents) {
content::WebContents* web_contents =
content::WebContents::FromJavaWebContents(java_web_contents);
return web_contents->IsCapabilityActive(
content::WebContentsCapabilityType::kBluetoothScanning);
}
DEFINE_JNI(BluetoothBridge)