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

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

Issue 1690133002: Implement BluetoothRemoteGattServiceWin and related unit tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments and split out of included GATT services Created 4 years, 10 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_ADAPTER_WIN_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_WIN_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_WIN_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_WIN_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 void DevicesPolled(const ScopedVector<BluetoothTaskManagerWin::DeviceState>& 86 void DevicesPolled(const ScopedVector<BluetoothTaskManagerWin::DeviceState>&
87 devices) override; 87 devices) override;
88 88
89 const scoped_refptr<base::SequencedTaskRunner>& ui_task_runner() const { 89 const scoped_refptr<base::SequencedTaskRunner>& ui_task_runner() const {
90 return ui_task_runner_; 90 return ui_task_runner_;
91 } 91 }
92 const scoped_refptr<BluetoothSocketThread>& socket_thread() const { 92 const scoped_refptr<BluetoothSocketThread>& socket_thread() const {
93 return socket_thread_; 93 return socket_thread_;
94 } 94 }
95 95
96 scoped_refptr<BluetoothTaskManagerWin> GetWinBluetoothTaskManager() {
97 return task_manager_;
98 }
99
96 protected: 100 protected:
97 // BluetoothAdapter: 101 // BluetoothAdapter:
98 void RemovePairingDelegateInternal( 102 void RemovePairingDelegateInternal(
99 device::BluetoothDevice::PairingDelegate* pairing_delegate) override; 103 device::BluetoothDevice::PairingDelegate* pairing_delegate) override;
100 104
101 private: 105 private:
102 friend class BluetoothAdapterWinTest; 106 friend class BluetoothAdapterWinTest;
103 friend class BluetoothTestWin; 107 friend class BluetoothTestWin;
104 108
105 enum DiscoveryStatus { 109 enum DiscoveryStatus {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 on_start_discovery_callbacks_; 150 on_start_discovery_callbacks_;
147 std::vector<base::Closure> on_stop_discovery_callbacks_; 151 std::vector<base::Closure> on_stop_discovery_callbacks_;
148 size_t num_discovery_listeners_; 152 size_t num_discovery_listeners_;
149 153
150 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; 154 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_;
151 scoped_refptr<BluetoothSocketThread> socket_thread_; 155 scoped_refptr<BluetoothSocketThread> socket_thread_;
152 scoped_refptr<BluetoothTaskManagerWin> task_manager_; 156 scoped_refptr<BluetoothTaskManagerWin> task_manager_;
153 157
154 base::ThreadChecker thread_checker_; 158 base::ThreadChecker thread_checker_;
155 159
160 // Flag indicating a device update must be forced in DevicesPolled.
161 bool force_update_device_for_test_;
162
156 // NOTE: This should remain the last member so it'll be destroyed and 163 // NOTE: This should remain the last member so it'll be destroyed and
157 // invalidate its weak pointers before any other members are destroyed. 164 // invalidate its weak pointers before any other members are destroyed.
158 base::WeakPtrFactory<BluetoothAdapterWin> weak_ptr_factory_; 165 base::WeakPtrFactory<BluetoothAdapterWin> weak_ptr_factory_;
159 166
160 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterWin); 167 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterWin);
161 }; 168 };
162 169
163 } // namespace device 170 } // namespace device
164 171
165 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_WIN_H_ 172 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698