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_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 "base/observer_list.h" | 12 #include "base/observer_list.h" |
13 #include "device/bluetooth/bluetooth_device.h" | 13 #include "device/bluetooth/bluetooth_device.h" |
14 #include "device/bluetooth/bluetooth_task_manager_win.h" | 14 #include "device/bluetooth/bluetooth_task_manager_win.h" |
15 | 15 |
16 namespace device { | 16 namespace device { |
17 | 17 |
18 class BluetoothAdapterWin; | 18 class BluetoothAdapterWin; |
19 class BluetoothServiceRecord; | 19 class BluetoothServiceRecord; |
20 class BluetoothSocketThreadWin; | 20 class BluetoothSocketThread; |
21 | 21 |
22 class BluetoothDeviceWin : public BluetoothDevice { | 22 class BluetoothDeviceWin : public BluetoothDevice { |
23 public: | 23 public: |
24 explicit BluetoothDeviceWin( | 24 explicit BluetoothDeviceWin( |
25 const BluetoothTaskManagerWin::DeviceState& state, | 25 const BluetoothTaskManagerWin::DeviceState& state, |
26 scoped_refptr<base::SequencedTaskRunner> ui_task_runner, | 26 scoped_refptr<base::SequencedTaskRunner> ui_task_runner, |
27 scoped_refptr<BluetoothSocketThreadWin> socket_thread, | 27 scoped_refptr<BluetoothSocketThread> socket_thread, |
28 net::NetLog* net_log, | 28 net::NetLog* net_log, |
29 const net::NetLog::Source& net_log_source); | 29 const net::NetLog::Source& net_log_source); |
30 virtual ~BluetoothDeviceWin(); | 30 virtual ~BluetoothDeviceWin(); |
31 | 31 |
32 // BluetoothDevice override | 32 // BluetoothDevice override |
33 virtual void AddObserver( | 33 virtual void AddObserver( |
34 device::BluetoothDevice::Observer* observer) OVERRIDE; | 34 device::BluetoothDevice::Observer* observer) OVERRIDE; |
35 virtual void RemoveObserver( | 35 virtual void RemoveObserver( |
36 device::BluetoothDevice::Observer* observer) OVERRIDE; | 36 device::BluetoothDevice::Observer* observer) OVERRIDE; |
37 virtual uint32 GetBluetoothClass() const OVERRIDE; | 37 virtual uint32 GetBluetoothClass() const OVERRIDE; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 virtual std::string GetDeviceName() const OVERRIDE; | 83 virtual std::string GetDeviceName() const OVERRIDE; |
84 | 84 |
85 private: | 85 private: |
86 friend class BluetoothAdapterWin; | 86 friend class BluetoothAdapterWin; |
87 | 87 |
88 // Used by BluetoothAdapterWin to update the visible state during | 88 // Used by BluetoothAdapterWin to update the visible state during |
89 // discovery. | 89 // discovery. |
90 void SetVisible(bool visible); | 90 void SetVisible(bool visible); |
91 | 91 |
92 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; | 92 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; |
93 scoped_refptr<BluetoothSocketThreadWin> socket_thread_; | 93 scoped_refptr<BluetoothSocketThread> socket_thread_; |
94 net::NetLog* net_log_; | 94 net::NetLog* net_log_; |
95 net::NetLog::Source net_log_source_; | 95 net::NetLog::Source net_log_source_; |
96 | 96 |
97 // List of observers interested in event notifications from us. | 97 // List of observers interested in event notifications from us. |
98 ObserverList<Observer> observers_; | 98 ObserverList<Observer> observers_; |
99 | 99 |
100 // The Bluetooth class of the device, a bitmask that may be decoded using | 100 // The Bluetooth class of the device, a bitmask that may be decoded using |
101 // https://www.bluetooth.org/Technical/AssignedNumbers/baseband.htm | 101 // https://www.bluetooth.org/Technical/AssignedNumbers/baseband.htm |
102 uint32 bluetooth_class_; | 102 uint32 bluetooth_class_; |
103 | 103 |
(...skipping 18 matching lines...) Expand all Loading... |
122 // The service records retrieved from SDP. | 122 // The service records retrieved from SDP. |
123 typedef ScopedVector<BluetoothServiceRecord> ServiceRecordList; | 123 typedef ScopedVector<BluetoothServiceRecord> ServiceRecordList; |
124 ServiceRecordList service_record_list_; | 124 ServiceRecordList service_record_list_; |
125 | 125 |
126 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceWin); | 126 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceWin); |
127 }; | 127 }; |
128 | 128 |
129 } // namespace device | 129 } // namespace device |
130 | 130 |
131 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_WIN_H_ | 131 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_WIN_H_ |
OLD | NEW |