Chromium Code Reviews| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 121 BluetoothDiscoveryFilter* discovery_filter, | 121 BluetoothDiscoveryFilter* discovery_filter, |
| 122 const base::Closure& callback, | 122 const base::Closure& callback, |
| 123 const DiscoverySessionErrorCallback& error_callback) override; | 123 const DiscoverySessionErrorCallback& error_callback) override; |
| 124 void SetDiscoveryFilter( | 124 void SetDiscoveryFilter( |
| 125 std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter, | 125 std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter, |
| 126 const base::Closure& callback, | 126 const base::Closure& callback, |
| 127 const DiscoverySessionErrorCallback& error_callback) override; | 127 const DiscoverySessionErrorCallback& error_callback) override; |
| 128 void RemovePairingDelegateInternal( | 128 void RemovePairingDelegateInternal( |
| 129 BluetoothDevice::PairingDelegate* pairing_delegate) override; | 129 BluetoothDevice::PairingDelegate* pairing_delegate) override; |
| 130 | 130 |
| 131 void PurgeTimedOutDevices(); | |
| 132 | |
| 133 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; | |
| 134 | |
| 131 // Java object org.chromium.device.bluetooth.ChromeBluetoothAdapter. | 135 // Java object org.chromium.device.bluetooth.ChromeBluetoothAdapter. |
| 132 base::android::ScopedJavaGlobalRef<jobject> j_adapter_; | 136 base::android::ScopedJavaGlobalRef<jobject> j_adapter_; |
| 133 | 137 |
| 138 private: | |
| 139 uint8_t numDiscoverySessions = 0; | |
|
ortuno
2016/06/17 19:31:41
Sorry for not noticing earlier. This should follow
perja
2016/06/22 07:41:52
Done.
| |
| 140 | |
| 134 // Note: This should remain the last member so it'll be destroyed and | 141 // Note: This should remain the last member so it'll be destroyed and |
| 135 // invalidate its weak pointers before any other members are destroyed. | 142 // invalidate its weak pointers before any other members are destroyed. |
| 136 base::WeakPtrFactory<BluetoothAdapterAndroid> weak_ptr_factory_; | 143 base::WeakPtrFactory<BluetoothAdapterAndroid> weak_ptr_factory_; |
| 137 | 144 |
| 138 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterAndroid); | 145 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterAndroid); |
| 139 }; | 146 }; |
| 140 | 147 |
| 141 } // namespace device | 148 } // namespace device |
| 142 | 149 |
| 143 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_ANDROID_H_ | 150 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_ANDROID_H_ |
| OLD | NEW |