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_socket_win.h" | 5 #include "device/bluetooth/bluetooth_socket_win.h" |
6 | 6 |
7 #include <objbase.h> | 7 #include <objbase.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 new BluetoothSocketWin(ui_task_runner, socket_thread, net_log, source)); | 84 new BluetoothSocketWin(ui_task_runner, socket_thread, net_log, source)); |
85 } | 85 } |
86 | 86 |
87 BluetoothSocketWin::BluetoothSocketWin( | 87 BluetoothSocketWin::BluetoothSocketWin( |
88 scoped_refptr<base::SequencedTaskRunner> ui_task_runner, | 88 scoped_refptr<base::SequencedTaskRunner> ui_task_runner, |
89 scoped_refptr<BluetoothSocketThread> socket_thread, | 89 scoped_refptr<BluetoothSocketThread> socket_thread, |
90 net::NetLog* net_log, | 90 net::NetLog* net_log, |
91 const net::NetLog::Source& source) | 91 const net::NetLog::Source& source) |
92 : BluetoothSocketNet(ui_task_runner, socket_thread, net_log, source), | 92 : BluetoothSocketNet(ui_task_runner, socket_thread, net_log, source), |
93 supports_rfcomm_(false), | 93 supports_rfcomm_(false), |
94 rfcomm_channel_(-1), | 94 rfcomm_channel_(0xFF), |
95 bth_addr_(BTH_ADDR_NULL) { | 95 bth_addr_(BTH_ADDR_NULL) { |
96 } | 96 } |
97 | 97 |
98 BluetoothSocketWin::~BluetoothSocketWin() { | 98 BluetoothSocketWin::~BluetoothSocketWin() { |
99 } | 99 } |
100 | 100 |
101 void BluetoothSocketWin::Connect( | 101 void BluetoothSocketWin::Connect( |
102 const BluetoothDeviceWin* device, | 102 const BluetoothDeviceWin* device, |
103 const BluetoothUUID& uuid, | 103 const BluetoothUUID& uuid, |
104 const base::Closure& success_callback, | 104 const base::Closure& success_callback, |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 scoped_refptr<BluetoothSocketWin> peer_socket = CreateBluetoothSocket( | 392 scoped_refptr<BluetoothSocketWin> peer_socket = CreateBluetoothSocket( |
393 ui_task_runner(), | 393 ui_task_runner(), |
394 socket_thread(), | 394 socket_thread(), |
395 net_log(), | 395 net_log(), |
396 source()); | 396 source()); |
397 peer_socket->SetTCPSocket(accept_socket.Pass()); | 397 peer_socket->SetTCPSocket(accept_socket.Pass()); |
398 success_callback.Run(peer_device, peer_socket); | 398 success_callback.Run(peer_device, peer_socket); |
399 } | 399 } |
400 | 400 |
401 } // namespace device | 401 } // namespace device |
OLD | NEW |