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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 // If there are start discovery requests, post the start discovery again. | 160 // If there are start discovery requests, post the start discovery again. |
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 int channel, | 166 int channel, |
167 bool insecure, | 167 bool insecure, |
168 const CreateServiceCallback& callback, | 168 const CreateServiceCallback& callback, |
169 const CreateServiceErrorCallback& error_callback) { | 169 const CreateServiceErrorCallback& error_callback) { |
170 // TODO(keybuk): implement. | 170 // Note that |insecure| is ignored. |
171 NOTIMPLEMENTED(); | 171 scoped_refptr<BluetoothSocketWin> socket = |
| 172 BluetoothSocketWin::CreateBluetoothSocket( |
| 173 ui_task_runner_, |
| 174 socket_thread_, |
| 175 NULL, |
| 176 net::NetLog::Source()); |
| 177 socket->Listen(this, uuid, channel, |
| 178 base::Bind(callback, socket), |
| 179 error_callback); |
172 } | 180 } |
173 | 181 |
174 void BluetoothAdapterWin::CreateL2capService( | 182 void BluetoothAdapterWin::CreateL2capService( |
175 const BluetoothUUID& uuid, | 183 const BluetoothUUID& uuid, |
176 int psm, | 184 int psm, |
177 const CreateServiceCallback& callback, | 185 const CreateServiceCallback& callback, |
178 const CreateServiceErrorCallback& error_callback) { | 186 const CreateServiceErrorCallback& error_callback) { |
179 // TODO(keybuk): implement. | 187 // TODO(keybuk): implement. |
180 NOTIMPLEMENTED(); | 188 NOTIMPLEMENTED(); |
181 } | 189 } |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 num_discovery_listeners_ -= on_stop_discovery_callbacks_.size(); | 311 num_discovery_listeners_ -= on_stop_discovery_callbacks_.size(); |
304 on_stop_discovery_callbacks_.clear(); | 312 on_stop_discovery_callbacks_.clear(); |
305 return; | 313 return; |
306 } | 314 } |
307 | 315 |
308 discovery_status_ = DISCOVERY_STOPPING; | 316 discovery_status_ = DISCOVERY_STOPPING; |
309 task_manager_->PostStopDiscoveryTask(); | 317 task_manager_->PostStopDiscoveryTask(); |
310 } | 318 } |
311 | 319 |
312 } // namespace device | 320 } // namespace device |
OLD | NEW |