OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_win.h" | 5 #include "device/bluetooth/bluetooth_adapter_win.h" |
6 | 6 |
7 #include <hash_set> | 7 #include <hash_set> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 MaybePostStartDiscoveryTask(); | 161 MaybePostStartDiscoveryTask(); |
162 } | 162 } |
163 | 163 |
164 void BluetoothAdapterWin::CreateRfcommService( | 164 void BluetoothAdapterWin::CreateRfcommService( |
165 const BluetoothUUID& uuid, | 165 const BluetoothUUID& uuid, |
166 const ServiceOptions& options, | 166 const ServiceOptions& options, |
167 const CreateServiceCallback& callback, | 167 const CreateServiceCallback& callback, |
168 const CreateServiceErrorCallback& error_callback) { | 168 const CreateServiceErrorCallback& error_callback) { |
169 scoped_refptr<BluetoothSocketWin> socket = | 169 scoped_refptr<BluetoothSocketWin> socket = |
170 BluetoothSocketWin::CreateBluetoothSocket( | 170 BluetoothSocketWin::CreateBluetoothSocket( |
171 ui_task_runner_, | 171 ui_task_runner_, socket_thread_); |
172 socket_thread_, | |
173 NULL, | |
174 net::NetLog::Source()); | |
175 socket->Listen(this, uuid, options, | 172 socket->Listen(this, uuid, options, |
176 base::Bind(callback, socket), | 173 base::Bind(callback, socket), |
177 error_callback); | 174 error_callback); |
178 } | 175 } |
179 | 176 |
180 void BluetoothAdapterWin::CreateL2capService( | 177 void BluetoothAdapterWin::CreateL2capService( |
181 const BluetoothUUID& uuid, | 178 const BluetoothUUID& uuid, |
182 const ServiceOptions& options, | 179 const ServiceOptions& options, |
183 const CreateServiceCallback& callback, | 180 const CreateServiceCallback& callback, |
184 const CreateServiceErrorCallback& error_callback) { | 181 const CreateServiceErrorCallback& error_callback) { |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 num_discovery_listeners_ -= on_stop_discovery_callbacks_.size(); | 306 num_discovery_listeners_ -= on_stop_discovery_callbacks_.size(); |
310 on_stop_discovery_callbacks_.clear(); | 307 on_stop_discovery_callbacks_.clear(); |
311 return; | 308 return; |
312 } | 309 } |
313 | 310 |
314 discovery_status_ = DISCOVERY_STOPPING; | 311 discovery_status_ = DISCOVERY_STOPPING; |
315 task_manager_->PostStopDiscoveryTask(); | 312 task_manager_->PostStopDiscoveryTask(); |
316 } | 313 } |
317 | 314 |
318 } // namespace device | 315 } // namespace device |
OLD | NEW |