| 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_device_win.h" | 5 #include "device/bluetooth/bluetooth_device_win.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/memory/scoped_vector.h" | 11 #include "base/memory/scoped_vector.h" |
| 12 #include "base/sequenced_task_runner.h" | 12 #include "base/sequenced_task_runner.h" |
| 13 #include "base/strings/stringprintf.h" | 13 #include "base/strings/stringprintf.h" |
| 14 #include "device/bluetooth/bluetooth_out_of_band_pairing_data.h" | 14 #include "device/bluetooth/bluetooth_out_of_band_pairing_data.h" |
| 15 #include "device/bluetooth/bluetooth_profile_win.h" | 15 #include "device/bluetooth/bluetooth_profile_win.h" |
| 16 #include "device/bluetooth/bluetooth_service_record_win.h" | 16 #include "device/bluetooth/bluetooth_service_record_win.h" |
| 17 #include "device/bluetooth/bluetooth_socket_thread_win.h" | 17 #include "device/bluetooth/bluetooth_socket_thread.h" |
| 18 #include "device/bluetooth/bluetooth_socket_win.h" | 18 #include "device/bluetooth/bluetooth_socket_win.h" |
| 19 #include "device/bluetooth/bluetooth_task_manager_win.h" | 19 #include "device/bluetooth/bluetooth_task_manager_win.h" |
| 20 | 20 |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 const int kSdpBytesBufferSize = 1024; | 23 const int kSdpBytesBufferSize = 1024; |
| 24 | 24 |
| 25 } // namespace | 25 } // namespace |
| 26 | 26 |
| 27 namespace device { | 27 namespace device { |
| 28 | 28 |
| 29 BluetoothDeviceWin::BluetoothDeviceWin( | 29 BluetoothDeviceWin::BluetoothDeviceWin( |
| 30 const BluetoothTaskManagerWin::DeviceState& state, | 30 const BluetoothTaskManagerWin::DeviceState& state, |
| 31 scoped_refptr<base::SequencedTaskRunner> ui_task_runner, | 31 scoped_refptr<base::SequencedTaskRunner> ui_task_runner, |
| 32 scoped_refptr<BluetoothSocketThreadWin> socket_thread, | 32 scoped_refptr<BluetoothSocketThread> socket_thread, |
| 33 net::NetLog* net_log, | 33 net::NetLog* net_log, |
| 34 const net::NetLog::Source& net_log_source) | 34 const net::NetLog::Source& net_log_source) |
| 35 : BluetoothDevice(), | 35 : BluetoothDevice(), |
| 36 ui_task_runner_(ui_task_runner), | 36 ui_task_runner_(ui_task_runner), |
| 37 socket_thread_(socket_thread), | 37 socket_thread_(socket_thread), |
| 38 net_log_(net_log), | 38 net_log_(net_log), |
| 39 net_log_source_(net_log_source) { | 39 net_log_source_(net_log_source) { |
| 40 name_ = state.name; | 40 name_ = state.name; |
| 41 address_ = state.address; | 41 address_ = state.address; |
| 42 bluetooth_class_ = state.bluetooth_class; | 42 bluetooth_class_ = state.bluetooth_class; |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 for (ServiceRecordList::const_iterator iter = service_record_list_.begin(); | 215 for (ServiceRecordList::const_iterator iter = service_record_list_.begin(); |
| 216 iter != service_record_list_.end(); | 216 iter != service_record_list_.end(); |
| 217 ++iter) { | 217 ++iter) { |
| 218 if ((*iter)->uuid() == uuid) | 218 if ((*iter)->uuid() == uuid) |
| 219 return *iter; | 219 return *iter; |
| 220 } | 220 } |
| 221 return NULL; | 221 return NULL; |
| 222 } | 222 } |
| 223 | 223 |
| 224 } // namespace device | 224 } // namespace device |
| OLD | NEW |