| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_ANDROID_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_ANDROID_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_ANDROID_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_ANDROID_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 BluetoothDiscoveryFilter* discovery_filter, | 119 BluetoothDiscoveryFilter* discovery_filter, |
| 120 const base::Closure& callback, | 120 const base::Closure& callback, |
| 121 const DiscoverySessionErrorCallback& error_callback) override; | 121 const DiscoverySessionErrorCallback& error_callback) override; |
| 122 void SetDiscoveryFilter( | 122 void SetDiscoveryFilter( |
| 123 std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter, | 123 std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter, |
| 124 const base::Closure& callback, | 124 const base::Closure& callback, |
| 125 const DiscoverySessionErrorCallback& error_callback) override; | 125 const DiscoverySessionErrorCallback& error_callback) override; |
| 126 void RemovePairingDelegateInternal( | 126 void RemovePairingDelegateInternal( |
| 127 BluetoothDevice::PairingDelegate* pairing_delegate) override; | 127 BluetoothDevice::PairingDelegate* pairing_delegate) override; |
| 128 | 128 |
| 129 void PurgeTimedOutDevices(); |
| 130 |
| 131 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; |
| 132 |
| 129 // Java object org.chromium.device.bluetooth.ChromeBluetoothAdapter. | 133 // Java object org.chromium.device.bluetooth.ChromeBluetoothAdapter. |
| 130 base::android::ScopedJavaGlobalRef<jobject> j_adapter_; | 134 base::android::ScopedJavaGlobalRef<jobject> j_adapter_; |
| 131 | 135 |
| 132 // Note: This should remain the last member so it'll be destroyed and | 136 // Note: This should remain the last member so it'll be destroyed and |
| 133 // invalidate its weak pointers before any other members are destroyed. | 137 // invalidate its weak pointers before any other members are destroyed. |
| 134 base::WeakPtrFactory<BluetoothAdapterAndroid> weak_ptr_factory_; | 138 base::WeakPtrFactory<BluetoothAdapterAndroid> weak_ptr_factory_; |
| 135 | 139 |
| 136 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterAndroid); | 140 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterAndroid); |
| 137 }; | 141 }; |
| 138 | 142 |
| 139 } // namespace device | 143 } // namespace device |
| 140 | 144 |
| 141 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_ANDROID_H_ | 145 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_ANDROID_H_ |
| OLD | NEW |