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

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

Issue 2333923004: Extracting NetLog inner classes into their own classes. (Closed)
Patch Set: Some nit fixes and better, impl-agnostic naming of net_log_parameters_callback_typedef.h -> net/log… Created 4 years, 2 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
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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/observer_list.h" 14 #include "base/observer_list.h"
15 #include "device/bluetooth/bluetooth_device.h" 15 #include "device/bluetooth/bluetooth_device.h"
16 #include "device/bluetooth/bluetooth_export.h" 16 #include "device/bluetooth/bluetooth_export.h"
17 #include "device/bluetooth/bluetooth_task_manager_win.h" 17 #include "device/bluetooth/bluetooth_task_manager_win.h"
18 #include "net/log/net_log_source.h"
19
20 namespace net {
21 class NetLog;
22 }
18 23
19 namespace device { 24 namespace device {
20 25
21 class BluetoothAdapterWin; 26 class BluetoothAdapterWin;
22 class BluetoothServiceRecordWin; 27 class BluetoothServiceRecordWin;
23 class BluetoothSocketThread; 28 class BluetoothSocketThread;
24 29
25 class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceWin : public BluetoothDevice { 30 class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceWin : public BluetoothDevice {
26 public: 31 public:
27 explicit BluetoothDeviceWin( 32 explicit BluetoothDeviceWin(
28 BluetoothAdapterWin* adapter, 33 BluetoothAdapterWin* adapter,
29 const BluetoothTaskManagerWin::DeviceState& device_state, 34 const BluetoothTaskManagerWin::DeviceState& device_state,
30 const scoped_refptr<base::SequencedTaskRunner>& ui_task_runner, 35 const scoped_refptr<base::SequencedTaskRunner>& ui_task_runner,
31 const scoped_refptr<BluetoothSocketThread>& socket_thread, 36 const scoped_refptr<BluetoothSocketThread>& socket_thread,
32 net::NetLog* net_log, 37 net::NetLog* net_log,
33 const net::NetLog::Source& net_log_source); 38 const net::NetLogSource& net_log_source);
34 ~BluetoothDeviceWin() override; 39 ~BluetoothDeviceWin() override;
35 40
36 // BluetoothDevice override 41 // BluetoothDevice override
37 uint32_t GetBluetoothClass() const override; 42 uint32_t GetBluetoothClass() const override;
38 std::string GetAddress() const override; 43 std::string GetAddress() const override;
39 VendorIDSource GetVendorIDSource() const override; 44 VendorIDSource GetVendorIDSource() const override;
40 uint16_t GetVendorID() const override; 45 uint16_t GetVendorID() const override;
41 uint16_t GetProductID() const override; 46 uint16_t GetProductID() const override;
42 uint16_t GetDeviceID() const override; 47 uint16_t GetDeviceID() const override;
43 uint16_t GetAppearance() const override; 48 uint16_t GetAppearance() const override;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 BluetoothRemoteGattService* service); 125 BluetoothRemoteGattService* service);
121 126
122 // Updates the GATT services with the services stored in |service_state|. 127 // Updates the GATT services with the services stored in |service_state|.
123 void UpdateGattServices( 128 void UpdateGattServices(
124 const ScopedVector<BluetoothTaskManagerWin::ServiceRecordState>& 129 const ScopedVector<BluetoothTaskManagerWin::ServiceRecordState>&
125 service_state); 130 service_state);
126 131
127 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; 132 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_;
128 scoped_refptr<BluetoothSocketThread> socket_thread_; 133 scoped_refptr<BluetoothSocketThread> socket_thread_;
129 net::NetLog* net_log_; 134 net::NetLog* net_log_;
130 net::NetLog::Source net_log_source_; 135 net::NetLogSource net_log_source_;
131 136
132 // The Bluetooth class of the device, a bitmask that may be decoded using 137 // The Bluetooth class of the device, a bitmask that may be decoded using
133 // https://www.bluetooth.org/Technical/AssignedNumbers/baseband.htm 138 // https://www.bluetooth.org/Technical/AssignedNumbers/baseband.htm
134 uint32_t bluetooth_class_; 139 uint32_t bluetooth_class_;
135 140
136 // The name of the device, as supplied by the remote device. 141 // The name of the device, as supplied by the remote device.
137 base::Optional<std::string> name_; 142 base::Optional<std::string> name_;
138 143
139 // The Bluetooth address of the device. 144 // The Bluetooth address of the device.
140 std::string address_; 145 std::string address_;
(...skipping 12 matching lines...) Expand all
153 158
154 // The service records retrieved from SDP. 159 // The service records retrieved from SDP.
155 ServiceRecordList service_record_list_; 160 ServiceRecordList service_record_list_;
156 161
157 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceWin); 162 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceWin);
158 }; 163 };
159 164
160 } // namespace device 165 } // namespace device
161 166
162 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_WIN_H_ 167 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698