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

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

Issue 787953004: bluetooth: Use BluetoothAdapter in BluetoothDispatcherHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: virtual/override replaced Created 5 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
« no previous file with comments | « content/shell/browser/shell_views.cc ('k') | device/bluetooth/bluetooth_adapter_chromeos.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 const InitCallback& init_callback); 190 const InitCallback& init_callback);
191 191
192 // Returns a weak pointer to an existing adapter for testing purposes only. 192 // Returns a weak pointer to an existing adapter for testing purposes only.
193 base::WeakPtr<BluetoothAdapter> GetWeakPtrForTesting(); 193 base::WeakPtr<BluetoothAdapter> GetWeakPtrForTesting();
194 194
195 #if defined(OS_CHROMEOS) 195 #if defined(OS_CHROMEOS)
196 // Shutdown the adapter: tear down and clean up all objects owned by 196 // Shutdown the adapter: tear down and clean up all objects owned by
197 // BluetoothAdapter. After this call, the BluetoothAdapter will behave as if 197 // BluetoothAdapter. After this call, the BluetoothAdapter will behave as if
198 // no Bluetooth controller exists in the local system. |IsPresent| will return 198 // no Bluetooth controller exists in the local system. |IsPresent| will return
199 // false. 199 // false.
200 void Shutdown(); 200 virtual void Shutdown();
201 #endif 201 #endif
202 202
203 // Adds and removes observers for events on this bluetooth adapter. If 203 // Adds and removes observers for events on this bluetooth adapter. If
204 // monitoring multiple adapters, check the |adapter| parameter of observer 204 // monitoring multiple adapters, check the |adapter| parameter of observer
205 // methods to determine which adapter is issuing the event. 205 // methods to determine which adapter is issuing the event.
206 virtual void AddObserver(BluetoothAdapter::Observer* observer) = 0; 206 virtual void AddObserver(BluetoothAdapter::Observer* observer) = 0;
207 virtual void RemoveObserver( 207 virtual void RemoveObserver(
208 BluetoothAdapter::Observer* observer) = 0; 208 BluetoothAdapter::Observer* observer) = 0;
209 209
210 // The address of this adapter. The address format is "XX:XX:XX:XX:XX:XX", 210 // The address of this adapter. The address format is "XX:XX:XX:XX:XX:XX",
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 // Trait for RefCountedThreadSafe that deletes BluetoothAdapter. 451 // Trait for RefCountedThreadSafe that deletes BluetoothAdapter.
452 struct BluetoothAdapterDeleter { 452 struct BluetoothAdapterDeleter {
453 static void Destruct(const BluetoothAdapter* adapter) { 453 static void Destruct(const BluetoothAdapter* adapter) {
454 adapter->DeleteOnCorrectThread(); 454 adapter->DeleteOnCorrectThread();
455 } 455 }
456 }; 456 };
457 457
458 } // namespace device 458 } // namespace device
459 459
460 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ 460 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_
OLDNEW
« no previous file with comments | « content/shell/browser/shell_views.cc ('k') | device/bluetooth/bluetooth_adapter_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698