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