| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CHROMEOS_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_CHROMEOS_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_CHROMEOS_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_CHROMEOS_H_ |
| 7 | 7 |
| 8 #include "chromeos/chromeos_export.h" | 8 #include "chromeos/chromeos_export.h" |
| 9 #include "device/bluetooth/bluetooth_socket.h" | 9 #include "device/bluetooth/bluetooth_socket.h" |
| 10 #include "device/bluetooth/bluetooth_socket_net.h" | 10 #include "device/bluetooth/bluetooth_socket_net.h" |
| 11 #include "device/bluetooth/bluetooth_uuid.h" |
| 11 | 12 |
| 12 namespace dbus { | 13 namespace dbus { |
| 13 class FileDescriptor; | 14 class FileDescriptor; |
| 14 } // namespace dbus | 15 } // namespace dbus |
| 15 | 16 |
| 16 | |
| 17 namespace chromeos { | 17 namespace chromeos { |
| 18 | 18 |
| 19 // The BluetoothSocketChromeOS class implements BluetoothSocket for the | 19 // The BluetoothSocketChromeOS class implements BluetoothSocket for the |
| 20 // Chrome OS platform. | 20 // Chrome OS platform. |
| 21 class CHROMEOS_EXPORT BluetoothSocketChromeOS | 21 class CHROMEOS_EXPORT BluetoothSocketChromeOS |
| 22 : public device::BluetoothSocketNet { | 22 : public device::BluetoothSocketNet { |
| 23 public: | 23 public: |
| 24 static scoped_refptr<BluetoothSocketChromeOS> CreateBluetoothSocket( | 24 static scoped_refptr<BluetoothSocketChromeOS> CreateBluetoothSocket( |
| 25 scoped_refptr<base::SequencedTaskRunner> ui_task_runner, | 25 scoped_refptr<base::SequencedTaskRunner> ui_task_runner, |
| 26 scoped_refptr<device::BluetoothSocketThread> socket_thread, | 26 scoped_refptr<device::BluetoothSocketThread> socket_thread, |
| 27 net::NetLog* net_log, | 27 net::NetLog* net_log, |
| 28 const net::NetLog::Source& source); | 28 const net::NetLog::Source& source); |
| 29 | 29 |
| 30 virtual void Connect(scoped_ptr<dbus::FileDescriptor> fd, | 30 virtual void Connect(scoped_ptr<dbus::FileDescriptor> fd, |
| 31 const base::Closure& success_callback, | 31 const base::Closure& success_callback, |
| 32 const ErrorCompletionCallback& error_callback); | 32 const ErrorCompletionCallback& error_callback); |
| 33 | 33 |
| 34 // BluetoothSocket: |
| 35 virtual void Accept(const AcceptCompletionCallback& success_callback, |
| 36 const ErrorCompletionCallback& error_callback) OVERRIDE; |
| 37 |
| 34 protected: | 38 protected: |
| 35 virtual ~BluetoothSocketChromeOS(); | 39 virtual ~BluetoothSocketChromeOS(); |
| 36 | 40 |
| 37 private: | 41 private: |
| 38 BluetoothSocketChromeOS( | 42 BluetoothSocketChromeOS( |
| 39 scoped_refptr<base::SequencedTaskRunner> ui_task_runner, | 43 scoped_refptr<base::SequencedTaskRunner> ui_task_runner, |
| 40 scoped_refptr<device::BluetoothSocketThread> socket_thread, | 44 scoped_refptr<device::BluetoothSocketThread> socket_thread, |
| 41 net::NetLog* net_log, | 45 net::NetLog* net_log, |
| 42 const net::NetLog::Source& source); | 46 const net::NetLog::Source& source); |
| 43 | 47 |
| 44 void DoConnect(scoped_ptr<dbus::FileDescriptor> fd, | 48 void DoConnect(scoped_ptr<dbus::FileDescriptor> fd, |
| 45 const base::Closure& success_callback, | 49 const base::Closure& success_callback, |
| 46 const ErrorCompletionCallback& error_callback); | 50 const ErrorCompletionCallback& error_callback); |
| 47 | 51 |
| 48 | |
| 49 DISALLOW_COPY_AND_ASSIGN(BluetoothSocketChromeOS); | 52 DISALLOW_COPY_AND_ASSIGN(BluetoothSocketChromeOS); |
| 50 }; | 53 }; |
| 51 | 54 |
| 52 } // namespace chromeos | 55 } // namespace chromeos |
| 53 | 56 |
| 54 #endif // DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_CHROMEOS_H_ | 57 #endif // DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_CHROMEOS_H_ |
| OLD | NEW |