Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Side by Side Diff: device/bluetooth/bluetooth_adapter_android.cc

Issue 1711393002: bluetooth: android: register for adapter on/off events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased on master Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "device/bluetooth/bluetooth_adapter_android.h" 5 #include "device/bluetooth/bluetooth_adapter_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/sequenced_task_runner.h" 9 #include "base/sequenced_task_runner.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 error_callback.Run(BluetoothAudioSink::ERROR_UNSUPPORTED_PLATFORM); 127 error_callback.Run(BluetoothAudioSink::ERROR_UNSUPPORTED_PLATFORM);
128 } 128 }
129 129
130 void BluetoothAdapterAndroid::RegisterAdvertisement( 130 void BluetoothAdapterAndroid::RegisterAdvertisement(
131 scoped_ptr<BluetoothAdvertisement::Data> advertisement_data, 131 scoped_ptr<BluetoothAdvertisement::Data> advertisement_data,
132 const CreateAdvertisementCallback& callback, 132 const CreateAdvertisementCallback& callback,
133 const CreateAdvertisementErrorCallback& error_callback) { 133 const CreateAdvertisementErrorCallback& error_callback) {
134 error_callback.Run(BluetoothAdvertisement::ERROR_UNSUPPORTED_PLATFORM); 134 error_callback.Run(BluetoothAdvertisement::ERROR_UNSUPPORTED_PLATFORM);
135 } 135 }
136 136
137 void BluetoothAdapterAndroid::OnAdapterStateChanged(
138 JNIEnv* env,
139 const JavaParamRef<jobject>& caller,
140 const bool powered) {
141 NotifyAdapterStateChanged(powered);
142 }
143
137 void BluetoothAdapterAndroid::OnScanFailed( 144 void BluetoothAdapterAndroid::OnScanFailed(
138 JNIEnv* env, 145 JNIEnv* env,
139 const JavaParamRef<jobject>& caller) { 146 const JavaParamRef<jobject>& caller) {
140 MarkDiscoverySessionsAsInactive(); 147 MarkDiscoverySessionsAsInactive();
141 } 148 }
142 149
143 void BluetoothAdapterAndroid::CreateOrUpdateDeviceOnScan( 150 void BluetoothAdapterAndroid::CreateOrUpdateDeviceOnScan(
144 JNIEnv* env, 151 JNIEnv* env,
145 const JavaParamRef<jobject>& caller, 152 const JavaParamRef<jobject>& caller,
146 const JavaParamRef<jstring>& address, 153 const JavaParamRef<jstring>& address,
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 // TODO(scheib): Support filters crbug.com/490401 219 // TODO(scheib): Support filters crbug.com/490401
213 NOTIMPLEMENTED(); 220 NOTIMPLEMENTED();
214 error_callback.Run(UMABluetoothDiscoverySessionOutcome::NOT_IMPLEMENTED); 221 error_callback.Run(UMABluetoothDiscoverySessionOutcome::NOT_IMPLEMENTED);
215 } 222 }
216 223
217 void BluetoothAdapterAndroid::RemovePairingDelegateInternal( 224 void BluetoothAdapterAndroid::RemovePairingDelegateInternal(
218 device::BluetoothDevice::PairingDelegate* pairing_delegate) { 225 device::BluetoothDevice::PairingDelegate* pairing_delegate) {
219 } 226 }
220 227
221 } // namespace device 228 } // namespace device
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698