| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 const CreateServiceCallback& callback, | 78 const CreateServiceCallback& callback, |
| 79 const CreateServiceErrorCallback& error_callback) override; | 79 const CreateServiceErrorCallback& error_callback) override; |
| 80 void RegisterAudioSink( | 80 void RegisterAudioSink( |
| 81 const BluetoothAudioSink::Options& options, | 81 const BluetoothAudioSink::Options& options, |
| 82 const AcquiredCallback& callback, | 82 const AcquiredCallback& callback, |
| 83 const BluetoothAudioSink::ErrorCallback& error_callback) override; | 83 const BluetoothAudioSink::ErrorCallback& error_callback) override; |
| 84 void RegisterAdvertisement( | 84 void RegisterAdvertisement( |
| 85 std::unique_ptr<BluetoothAdvertisement::Data> advertisement_data, | 85 std::unique_ptr<BluetoothAdvertisement::Data> advertisement_data, |
| 86 const CreateAdvertisementCallback& callback, | 86 const CreateAdvertisementCallback& callback, |
| 87 const CreateAdvertisementErrorCallback& error_callback) override; | 87 const CreateAdvertisementErrorCallback& error_callback) override; |
| 88 BluetoothLocalGattService* GetGattService( |
| 89 const std::string& identifier) const override; |
| 88 | 90 |
| 89 // Called when adapter state changes. | 91 // Called when adapter state changes. |
| 90 void OnAdapterStateChanged(JNIEnv* env, | 92 void OnAdapterStateChanged(JNIEnv* env, |
| 91 const base::android::JavaParamRef<jobject>& caller, | 93 const base::android::JavaParamRef<jobject>& caller, |
| 92 const bool powered); | 94 const bool powered); |
| 93 | 95 |
| 94 // Handles a scan error event by invalidating all discovery sessions. | 96 // Handles a scan error event by invalidating all discovery sessions. |
| 95 void OnScanFailed(JNIEnv* env, | 97 void OnScanFailed(JNIEnv* env, |
| 96 const base::android::JavaParamRef<jobject>& caller); | 98 const base::android::JavaParamRef<jobject>& caller); |
| 97 | 99 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 // Note: This should remain the last member so it'll be destroyed and | 134 // Note: This should remain the last member so it'll be destroyed and |
| 133 // invalidate its weak pointers before any other members are destroyed. | 135 // invalidate its weak pointers before any other members are destroyed. |
| 134 base::WeakPtrFactory<BluetoothAdapterAndroid> weak_ptr_factory_; | 136 base::WeakPtrFactory<BluetoothAdapterAndroid> weak_ptr_factory_; |
| 135 | 137 |
| 136 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterAndroid); | 138 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterAndroid); |
| 137 }; | 139 }; |
| 138 | 140 |
| 139 } // namespace device | 141 } // namespace device |
| 140 | 142 |
| 141 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_ANDROID_H_ | 143 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_ANDROID_H_ |
| OLD | NEW |