[android_webview] Disable AwSettingsTest broken by Blink roll.
[chromium-blink-merge.git] / device / bluetooth / bluetooth_socket_chromeos.h
blobd9e89fa61e64d08a6aa62cfd12b6adfcec425b8b
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
3 // found in the LICENSE file.
5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_CHROMEOS_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_CHROMEOS_H_
8 #include <string>
10 #include "base/memory/ref_counted.h"
11 #include "device/bluetooth/bluetooth_socket.h"
13 namespace device {
15 class BluetoothServiceRecord;
17 } // namespace device
19 namespace net {
21 class DrainableIOBuffer;
22 class GrowableIOBuffer;
24 } // namespace net
26 namespace chromeos {
28 // This class is an implementation of BluetoothSocket class for Chrome OS
29 // platform.
30 class BluetoothSocketChromeOS : public device::BluetoothSocket {
31 public:
32 static scoped_refptr<device::BluetoothSocket> CreateBluetoothSocket(
33 const device::BluetoothServiceRecord& service_record);
35 // BluetoothSocket override
36 virtual bool Receive(net::GrowableIOBuffer* buffer) OVERRIDE;
37 virtual bool Send(net::DrainableIOBuffer* buffer) OVERRIDE;
38 virtual std::string GetLastErrorMessage() const OVERRIDE;
40 protected:
41 virtual ~BluetoothSocketChromeOS();
43 private:
44 BluetoothSocketChromeOS(int fd);
46 const int fd_;
47 std::string error_message_;
49 DISALLOW_COPY_AND_ASSIGN(BluetoothSocketChromeOS);
52 } // namespace chromeos
54 #endif // DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_CHROMEOS_H_