[android_webview] Disable AwSettingsTest broken by Blink roll.
[chromium-blink-merge.git] / device / bluetooth / bluetooth_socket_win.h
blob41713e713097d7c7c377ddaee04cebe7a8f4cd60
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_WIN_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_WIN_H_
8 #include <WinSock2.h>
10 #include <string>
12 #include "base/memory/ref_counted.h"
13 #include "device/bluetooth/bluetooth_socket.h"
15 namespace net {
17 class DrainableIOBuffer;
18 class GrowableIOBuffer;
20 } // namespace net
22 namespace device {
24 class BluetoothServiceRecord;
26 // This class is an implementation of BluetoothSocket class for Windows
27 // platform.
28 class BluetoothSocketWin : public BluetoothSocket {
29 public:
30 static scoped_refptr<BluetoothSocket> CreateBluetoothSocket(
31 const BluetoothServiceRecord& service_record);
33 // BluetoothSocket override
34 virtual bool Receive(net::GrowableIOBuffer* buffer) OVERRIDE;
35 virtual bool Send(net::DrainableIOBuffer* buffer) OVERRIDE;
36 virtual std::string GetLastErrorMessage() const OVERRIDE;
38 protected:
39 virtual ~BluetoothSocketWin();
41 private:
42 explicit BluetoothSocketWin(SOCKET fd);
44 const SOCKET fd_;
45 std::string error_message_;
47 DISALLOW_COPY_AND_ASSIGN(BluetoothSocketWin);
50 } // namespace device
52 #endif // DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_WIN_H_