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

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

Issue 2614753004: Remove ScopedVector from bluetooth. (Closed)
Patch Set: last win bits Created 3 years, 11 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 <memory> 10 #include <memory>
11 #include <set> 11 #include <set>
12 #include <string> 12 #include <string>
13 #include <utility> 13 #include <utility>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/containers/hash_tables.h" 16 #include "base/containers/hash_tables.h"
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "base/memory/ref_counted.h" 18 #include "base/memory/ref_counted.h"
19 #include "base/memory/scoped_vector.h"
20 #include "base/memory/weak_ptr.h" 19 #include "base/memory/weak_ptr.h"
21 #include "base/threading/thread_checker.h" 20 #include "base/threading/thread_checker.h"
22 #include "device/bluetooth/bluetooth_adapter.h" 21 #include "device/bluetooth/bluetooth_adapter.h"
23 #include "device/bluetooth/bluetooth_discovery_session.h" 22 #include "device/bluetooth/bluetooth_discovery_session.h"
24 #include "device/bluetooth/bluetooth_export.h" 23 #include "device/bluetooth/bluetooth_export.h"
25 #include "device/bluetooth/bluetooth_task_manager_win.h" 24 #include "device/bluetooth/bluetooth_task_manager_win.h"
26 25
27 namespace base { 26 namespace base {
28 class SequencedTaskRunner; 27 class SequencedTaskRunner;
29 } // namespace base 28 } // namespace base
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 const CreateAdvertisementCallback& callback, 73 const CreateAdvertisementCallback& callback,
75 const AdvertisementErrorCallback& error_callback) override; 74 const AdvertisementErrorCallback& error_callback) override;
76 BluetoothLocalGattService* GetGattService( 75 BluetoothLocalGattService* GetGattService(
77 const std::string& identifier) const override; 76 const std::string& identifier) const override;
78 77
79 // BluetoothTaskManagerWin::Observer override 78 // BluetoothTaskManagerWin::Observer override
80 void AdapterStateChanged( 79 void AdapterStateChanged(
81 const BluetoothTaskManagerWin::AdapterState& state) override; 80 const BluetoothTaskManagerWin::AdapterState& state) override;
82 void DiscoveryStarted(bool success) override; 81 void DiscoveryStarted(bool success) override;
83 void DiscoveryStopped() override; 82 void DiscoveryStopped() override;
84 void DevicesPolled(const ScopedVector<BluetoothTaskManagerWin::DeviceState>& 83 void DevicesPolled(
85 devices) override; 84 const std::vector<std::unique_ptr<BluetoothTaskManagerWin::DeviceState>>&
85 devices) override;
86 86
87 const scoped_refptr<base::SequencedTaskRunner>& ui_task_runner() const { 87 const scoped_refptr<base::SequencedTaskRunner>& ui_task_runner() const {
88 return ui_task_runner_; 88 return ui_task_runner_;
89 } 89 }
90 const scoped_refptr<BluetoothSocketThread>& socket_thread() const { 90 const scoped_refptr<BluetoothSocketThread>& socket_thread() const {
91 return socket_thread_; 91 return socket_thread_;
92 } 92 }
93 93
94 scoped_refptr<BluetoothTaskManagerWin> GetWinBluetoothTaskManager() { 94 scoped_refptr<BluetoothTaskManagerWin> GetWinBluetoothTaskManager() {
95 return task_manager_; 95 return task_manager_;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // NOTE: This should remain the last member so it'll be destroyed and 161 // NOTE: This should remain the last member so it'll be destroyed and
162 // invalidate its weak pointers before any other members are destroyed. 162 // invalidate its weak pointers before any other members are destroyed.
163 base::WeakPtrFactory<BluetoothAdapterWin> weak_ptr_factory_; 163 base::WeakPtrFactory<BluetoothAdapterWin> weak_ptr_factory_;
164 164
165 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterWin); 165 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterWin);
166 }; 166 };
167 167
168 } // namespace device 168 } // namespace device
169 169
170 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_WIN_H_ 170 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_WIN_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_adapter_unittest.cc ('k') | device/bluetooth/bluetooth_adapter_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698