Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: device/bluetooth/bluetooth_device_win.h

Issue 180163009: chrome.bluetooth API improvements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ChromeOS Full build. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « device/bluetooth/bluetooth_device_mac.mm ('k') | device/bluetooth/bluetooth_device_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_DEVICE_WIN_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_WIN_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_WIN_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_WIN_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "device/bluetooth/bluetooth_device.h" 12 #include "device/bluetooth/bluetooth_device.h"
13 #include "device/bluetooth/bluetooth_task_manager_win.h" 13 #include "device/bluetooth/bluetooth_task_manager_win.h"
14 14
15 namespace device { 15 namespace device {
16 16
17 class BluetoothAdapterWin; 17 class BluetoothAdapterWin;
18 class BluetoothServiceRecord; 18 class BluetoothServiceRecord;
19 class BluetoothSocketThreadWin;
19 20
20 class BluetoothDeviceWin : public BluetoothDevice { 21 class BluetoothDeviceWin : public BluetoothDevice {
21 public: 22 public:
22 explicit BluetoothDeviceWin( 23 explicit BluetoothDeviceWin(
23 const BluetoothTaskManagerWin::DeviceState& state); 24 const BluetoothTaskManagerWin::DeviceState& state,
25 scoped_refptr<base::SequencedTaskRunner> ui_task_runner,
26 scoped_refptr<BluetoothSocketThreadWin> socket_thread,
27 net::NetLog* net_log,
28 const net::NetLog::Source& net_log_source);
24 virtual ~BluetoothDeviceWin(); 29 virtual ~BluetoothDeviceWin();
25 30
26 // BluetoothDevice override 31 // BluetoothDevice override
27 virtual uint32 GetBluetoothClass() const OVERRIDE; 32 virtual uint32 GetBluetoothClass() const OVERRIDE;
28 virtual std::string GetAddress() const OVERRIDE; 33 virtual std::string GetAddress() const OVERRIDE;
29 virtual VendorIDSource GetVendorIDSource() const OVERRIDE; 34 virtual VendorIDSource GetVendorIDSource() const OVERRIDE;
30 virtual uint16 GetVendorID() const OVERRIDE; 35 virtual uint16 GetVendorID() const OVERRIDE;
31 virtual uint16 GetProductID() const OVERRIDE; 36 virtual uint16 GetProductID() const OVERRIDE;
32 virtual uint16 GetDeviceID() const OVERRIDE; 37 virtual uint16 GetDeviceID() const OVERRIDE;
33 virtual bool IsPaired() const OVERRIDE; 38 virtual bool IsPaired() const OVERRIDE;
(...skipping 16 matching lines...) Expand all
50 virtual void Disconnect( 55 virtual void Disconnect(
51 const base::Closure& callback, 56 const base::Closure& callback,
52 const ErrorCallback& error_callback) OVERRIDE; 57 const ErrorCallback& error_callback) OVERRIDE;
53 virtual void Forget(const ErrorCallback& error_callback) OVERRIDE; 58 virtual void Forget(const ErrorCallback& error_callback) OVERRIDE;
54 virtual void ConnectToService( 59 virtual void ConnectToService(
55 const device::BluetoothUUID& service_uuid, 60 const device::BluetoothUUID& service_uuid,
56 const SocketCallback& callback) OVERRIDE; 61 const SocketCallback& callback) OVERRIDE;
57 virtual void ConnectToProfile( 62 virtual void ConnectToProfile(
58 device::BluetoothProfile* profile, 63 device::BluetoothProfile* profile,
59 const base::Closure& callback, 64 const base::Closure& callback,
60 const ErrorCallback& error_callback) OVERRIDE; 65 const ConnectToProfileErrorCallback& error_callback) OVERRIDE;
61 virtual void SetOutOfBandPairingData( 66 virtual void SetOutOfBandPairingData(
62 const BluetoothOutOfBandPairingData& data, 67 const BluetoothOutOfBandPairingData& data,
63 const base::Closure& callback, 68 const base::Closure& callback,
64 const ErrorCallback& error_callback) OVERRIDE; 69 const ErrorCallback& error_callback) OVERRIDE;
65 virtual void ClearOutOfBandPairingData( 70 virtual void ClearOutOfBandPairingData(
66 const base::Closure& callback, 71 const base::Closure& callback,
67 const ErrorCallback& error_callback) OVERRIDE; 72 const ErrorCallback& error_callback) OVERRIDE;
68 73
69 // Used by BluetoothProfileWin to retrieve the service record for the given 74 // Used by BluetoothProfileWin to retrieve the service record for the given
70 // |uuid|. 75 // |uuid|.
71 const BluetoothServiceRecord* GetServiceRecord( 76 const BluetoothServiceRecord* GetServiceRecord(
72 const device::BluetoothUUID& uuid) const; 77 const device::BluetoothUUID& uuid) const;
73 78
74 protected: 79 protected:
75 // BluetoothDevice override 80 // BluetoothDevice override
76 virtual std::string GetDeviceName() const OVERRIDE; 81 virtual std::string GetDeviceName() const OVERRIDE;
77 82
78 private: 83 private:
79 friend class BluetoothAdapterWin; 84 friend class BluetoothAdapterWin;
80 85
81 // Used by BluetoothAdapterWin to update the visible state during 86 // Used by BluetoothAdapterWin to update the visible state during
82 // discovery. 87 // discovery.
83 void SetVisible(bool visible); 88 void SetVisible(bool visible);
84 89
90 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_;
91 scoped_refptr<BluetoothSocketThreadWin> socket_thread_;
92 net::NetLog* net_log_;
93 net::NetLog::Source net_log_source_;
94
85 // The Bluetooth class of the device, a bitmask that may be decoded using 95 // The Bluetooth class of the device, a bitmask that may be decoded using
86 // https://www.bluetooth.org/Technical/AssignedNumbers/baseband.htm 96 // https://www.bluetooth.org/Technical/AssignedNumbers/baseband.htm
87 uint32 bluetooth_class_; 97 uint32 bluetooth_class_;
88 98
89 // The name of the device, as supplied by the remote device. 99 // The name of the device, as supplied by the remote device.
90 std::string name_; 100 std::string name_;
91 101
92 // The Bluetooth address of the device. 102 // The Bluetooth address of the device.
93 std::string address_; 103 std::string address_;
94 104
(...skipping 12 matching lines...) Expand all
107 // The service records retrieved from SDP. 117 // The service records retrieved from SDP.
108 typedef ScopedVector<BluetoothServiceRecord> ServiceRecordList; 118 typedef ScopedVector<BluetoothServiceRecord> ServiceRecordList;
109 ServiceRecordList service_record_list_; 119 ServiceRecordList service_record_list_;
110 120
111 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceWin); 121 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceWin);
112 }; 122 };
113 123
114 } // namespace device 124 } // namespace device
115 125
116 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_WIN_H_ 126 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_WIN_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_device_mac.mm ('k') | device/bluetooth/bluetooth_device_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698