| 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 "base/android/jni_android.h" | 8 #include "base/android/jni_android.h" |
| 9 #include "base/android/scoped_java_ref.h" | 9 #include "base/android/scoped_java_ref.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 const ErrorCallback& error_callback) override; | 107 const ErrorCallback& error_callback) override; |
| 108 void SetDiscoveryFilter(scoped_ptr<BluetoothDiscoveryFilter> discovery_filter, | 108 void SetDiscoveryFilter(scoped_ptr<BluetoothDiscoveryFilter> discovery_filter, |
| 109 const base::Closure& callback, | 109 const base::Closure& callback, |
| 110 const ErrorCallback& error_callback) override; | 110 const ErrorCallback& error_callback) override; |
| 111 void RemovePairingDelegateInternal( | 111 void RemovePairingDelegateInternal( |
| 112 BluetoothDevice::PairingDelegate* pairing_delegate) override; | 112 BluetoothDevice::PairingDelegate* pairing_delegate) override; |
| 113 | 113 |
| 114 // Java object org.chromium.device.bluetooth.ChromeBluetoothAdapter. | 114 // Java object org.chromium.device.bluetooth.ChromeBluetoothAdapter. |
| 115 base::android::ScopedJavaGlobalRef<jobject> j_adapter_; | 115 base::android::ScopedJavaGlobalRef<jobject> j_adapter_; |
| 116 | 116 |
| 117 std::string address_; | |
| 118 std::string name_; | |
| 119 | |
| 120 // Note: This should remain the last member so it'll be destroyed and | 117 // Note: This should remain the last member so it'll be destroyed and |
| 121 // invalidate its weak pointers before any other members are destroyed. | 118 // invalidate its weak pointers before any other members are destroyed. |
| 122 base::WeakPtrFactory<BluetoothAdapterAndroid> weak_ptr_factory_; | 119 base::WeakPtrFactory<BluetoothAdapterAndroid> weak_ptr_factory_; |
| 123 | 120 |
| 124 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterAndroid); | 121 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterAndroid); |
| 125 }; | 122 }; |
| 126 | 123 |
| 127 } // namespace device | 124 } // namespace device |
| 128 | 125 |
| 129 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_ANDROID_H_ | 126 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_ANDROID_H_ |
| OLD | NEW |