| 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_task_manager_win.h" | 5 #include "device/bluetooth/bluetooth_task_manager_win.h" |
| 6 | 6 |
| 7 #include <winsock2.h> | 7 #include <winsock2.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 WSALookupServiceEnd(sdp_handle); | 116 WSALookupServiceEnd(sdp_handle); |
| 117 } | 117 } |
| 118 | 118 |
| 119 } // namespace | 119 } // namespace |
| 120 | 120 |
| 121 namespace device { | 121 namespace device { |
| 122 | 122 |
| 123 // static | 123 // static |
| 124 const int BluetoothTaskManagerWin::kPollIntervalMs = 500; | 124 const int BluetoothTaskManagerWin::kPollIntervalMs = 500; |
| 125 | 125 |
| 126 BluetoothTaskManagerWin::AdapterState::AdapterState() : powered(false) { |
| 127 } |
| 128 |
| 129 BluetoothTaskManagerWin::AdapterState::~AdapterState() { |
| 130 } |
| 131 |
| 132 BluetoothTaskManagerWin::ServiceRecordState::ServiceRecordState() { |
| 133 } |
| 134 |
| 135 BluetoothTaskManagerWin::ServiceRecordState::~ServiceRecordState() { |
| 136 } |
| 137 |
| 138 BluetoothTaskManagerWin::DeviceState::DeviceState() |
| 139 : bluetooth_class(0), |
| 140 visible(false), |
| 141 connected(false), |
| 142 authenticated(false) { |
| 143 } |
| 144 |
| 145 BluetoothTaskManagerWin::DeviceState::~DeviceState() { |
| 146 } |
| 147 |
| 126 BluetoothTaskManagerWin::BluetoothTaskManagerWin( | 148 BluetoothTaskManagerWin::BluetoothTaskManagerWin( |
| 127 scoped_refptr<base::SequencedTaskRunner> ui_task_runner) | 149 scoped_refptr<base::SequencedTaskRunner> ui_task_runner) |
| 128 : ui_task_runner_(ui_task_runner), | 150 : ui_task_runner_(ui_task_runner), |
| 129 discovering_(false) { | 151 discovering_(false) { |
| 130 } | 152 } |
| 131 | 153 |
| 132 BluetoothTaskManagerWin::~BluetoothTaskManagerWin() { | 154 BluetoothTaskManagerWin::~BluetoothTaskManagerWin() { |
| 133 } | 155 } |
| 134 | 156 |
| 135 void BluetoothTaskManagerWin::AddObserver(Observer* observer) { | 157 void BluetoothTaskManagerWin::AddObserver(Observer* observer) { |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 const std::string device_address = (*iter)->address; | 442 const std::string device_address = (*iter)->address; |
| 421 ScopedVector<ServiceRecordState>* service_record_states = | 443 ScopedVector<ServiceRecordState>* service_record_states = |
| 422 &(*iter)->service_record_states; | 444 &(*iter)->service_record_states; |
| 423 | 445 |
| 424 DiscoverDeviceServices( | 446 DiscoverDeviceServices( |
| 425 device_address, L2CAP_PROTOCOL_UUID, service_record_states); | 447 device_address, L2CAP_PROTOCOL_UUID, service_record_states); |
| 426 } | 448 } |
| 427 } | 449 } |
| 428 | 450 |
| 429 } // namespace device | 451 } // namespace device |
| OLD | NEW |