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_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 <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
82 const scoped_refptr<BluetoothSocketThread>& socket_thread() const { | 82 const scoped_refptr<BluetoothSocketThread>& socket_thread() const { |
83 return socket_thread_; | 83 return socket_thread_; |
84 } | 84 } |
85 | 85 |
86 protected: | 86 protected: |
87 // BluetoothAdapter: | 87 // BluetoothAdapter: |
88 virtual void RemovePairingDelegateInternal( | 88 virtual void RemovePairingDelegateInternal( |
89 device::BluetoothDevice::PairingDelegate* pairing_delegate) override; | 89 device::BluetoothDevice::PairingDelegate* pairing_delegate) override; |
90 | 90 |
91 private: | 91 private: |
92 friend class base::DeleteHelper<BluetoothAdapterWin>; | |
92 friend class BluetoothAdapterWinTest; | 93 friend class BluetoothAdapterWinTest; |
93 | 94 |
94 enum DiscoveryStatus { | 95 enum DiscoveryStatus { |
95 NOT_DISCOVERING, | 96 NOT_DISCOVERING, |
96 DISCOVERY_STARTING, | 97 DISCOVERY_STARTING, |
97 DISCOVERING, | 98 DISCOVERING, |
98 DISCOVERY_STOPPING | 99 DISCOVERY_STOPPING |
99 }; | 100 }; |
100 | 101 |
101 explicit BluetoothAdapterWin(const InitCallback& init_callback); | 102 explicit BluetoothAdapterWin(const InitCallback& init_callback); |
102 virtual ~BluetoothAdapterWin(); | 103 virtual ~BluetoothAdapterWin(); |
103 | 104 |
104 // BluetoothAdapter: | 105 // BluetoothAdapter: |
106 virtual void DeleteOnCorrectThread() const { delete this; } | |
armansito
2014/12/16 22:01:47
Drop virtual, add override. Also, why does this me
scheib
2014/12/16 22:15:26
Done. Thanks, blatant error.
| |
105 virtual void AddDiscoverySession( | 107 virtual void AddDiscoverySession( |
106 const base::Closure& callback, | 108 const base::Closure& callback, |
107 const ErrorCallback& error_callback) override; | 109 const ErrorCallback& error_callback) override; |
108 virtual void RemoveDiscoverySession( | 110 virtual void RemoveDiscoverySession( |
109 const base::Closure& callback, | 111 const base::Closure& callback, |
110 const ErrorCallback& error_callback) override; | 112 const ErrorCallback& error_callback) override; |
111 | 113 |
112 void Init(); | 114 void Init(); |
113 void InitForTest( | 115 void InitForTest( |
114 scoped_refptr<base::SequencedTaskRunner> ui_task_runner, | 116 scoped_refptr<base::SequencedTaskRunner> ui_task_runner, |
(...skipping 27 matching lines...) Expand all Loading... | |
142 // NOTE: This should remain the last member so it'll be destroyed and | 144 // NOTE: This should remain the last member so it'll be destroyed and |
143 // invalidate its weak pointers before any other members are destroyed. | 145 // invalidate its weak pointers before any other members are destroyed. |
144 base::WeakPtrFactory<BluetoothAdapterWin> weak_ptr_factory_; | 146 base::WeakPtrFactory<BluetoothAdapterWin> weak_ptr_factory_; |
145 | 147 |
146 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterWin); | 148 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterWin); |
147 }; | 149 }; |
148 | 150 |
149 } // namespace device | 151 } // namespace device |
150 | 152 |
151 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_WIN_H_ | 153 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_WIN_H_ |
OLD | NEW |