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 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_WIN_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_WIN_H_ |
6 #define DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_WIN_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_WIN_H_ |
7 | 7 |
8 #include <WinSock2.h> | 8 #include <WinSock2.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 | 48 |
49 // connection has been established successfully. If an error occurs, calls | 49 // connection has been established successfully. If an error occurs, calls |
50 // |error_callback| with a system error message. | 50 // |error_callback| with a system error message. |
51 void Connect(const BluetoothServiceRecord& service_record, | 51 void Connect(const BluetoothServiceRecord& service_record, |
52 const base::Closure& success_callback, | 52 const base::Closure& success_callback, |
53 const ErrorCompletionCallback& error_callback); | 53 const ErrorCompletionCallback& error_callback); |
54 | 54 |
55 // BluetoothSocketNet: | 55 // BluetoothSocketNet: |
56 void ResetData(); | 56 void ResetData(); |
57 | 57 |
| 58 // BluetoothSocket: |
| 59 virtual void Accept(const AcceptCompletionCallback& success_callback, |
| 60 const ErrorCompletionCallback& error_callback) OVERRIDE; |
| 61 |
| 62 |
58 protected: | 63 protected: |
59 virtual ~BluetoothSocketWin(); | 64 virtual ~BluetoothSocketWin(); |
60 | 65 |
61 private: | 66 private: |
62 struct ServiceRegData; | 67 struct ServiceRegData; |
63 | 68 |
64 BluetoothSocketWin(scoped_refptr<base::SequencedTaskRunner> ui_task_runner, | 69 BluetoothSocketWin(scoped_refptr<base::SequencedTaskRunner> ui_task_runner, |
65 scoped_refptr<BluetoothSocketThread> socket_thread, | 70 scoped_refptr<BluetoothSocketThread> socket_thread, |
66 net::NetLog* net_log, | 71 net::NetLog* net_log, |
67 const net::NetLog::Source& source); | 72 const net::NetLog::Source& source); |
(...skipping 21 matching lines...) Expand all Loading... |
89 scoped_ptr<net::TCPSocket> accept_socket_; | 94 scoped_ptr<net::TCPSocket> accept_socket_; |
90 net::IPEndPoint accept_address_; | 95 net::IPEndPoint accept_address_; |
91 OnNewConnectionCallback on_new_connection_callback_; | 96 OnNewConnectionCallback on_new_connection_callback_; |
92 | 97 |
93 DISALLOW_COPY_AND_ASSIGN(BluetoothSocketWin); | 98 DISALLOW_COPY_AND_ASSIGN(BluetoothSocketWin); |
94 }; | 99 }; |
95 | 100 |
96 } // namespace device | 101 } // namespace device |
97 | 102 |
98 #endif // DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_WIN_H_ | 103 #endif // DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_WIN_H_ |
OLD | NEW |