| 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_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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 // discovering. This should be called by all platform implementations. | 454 // discovering. This should be called by all platform implementations. |
| 455 void MarkDiscoverySessionsAsInactive(); | 455 void MarkDiscoverySessionsAsInactive(); |
| 456 | 456 |
| 457 // Removes |discovery_session| from |discovery_sessions_|, if its in there. | 457 // Removes |discovery_session| from |discovery_sessions_|, if its in there. |
| 458 // Called by DiscoverySession when an instance is destroyed or becomes | 458 // Called by DiscoverySession when an instance is destroyed or becomes |
| 459 // inactive. | 459 // inactive. |
| 460 void DiscoverySessionBecameInactive( | 460 void DiscoverySessionBecameInactive( |
| 461 BluetoothDiscoverySession* discovery_session); | 461 BluetoothDiscoverySession* discovery_session); |
| 462 | 462 |
| 463 // Observers of BluetoothAdapter, notified from implementation subclasses. | 463 // Observers of BluetoothAdapter, notified from implementation subclasses. |
| 464 ObserverList<device::BluetoothAdapter::Observer> observers_; | 464 base::ObserverList<device::BluetoothAdapter::Observer> observers_; |
| 465 | 465 |
| 466 // Devices paired with, connected to, discovered by, or visible to the | 466 // Devices paired with, connected to, discovered by, or visible to the |
| 467 // adapter. The key is the Bluetooth address of the device and the value is | 467 // adapter. The key is the Bluetooth address of the device and the value is |
| 468 // the BluetoothDevice object whose lifetime is managed by the adapter | 468 // the BluetoothDevice object whose lifetime is managed by the adapter |
| 469 // instance. | 469 // instance. |
| 470 DevicesMap devices_; | 470 DevicesMap devices_; |
| 471 | 471 |
| 472 // Default pairing delegates registered with the adapter. | 472 // Default pairing delegates registered with the adapter. |
| 473 std::list<PairingDelegatePair> pairing_delegates_; | 473 std::list<PairingDelegatePair> pairing_delegates_; |
| 474 | 474 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 488 std::set<BluetoothDiscoverySession*> discovery_sessions_; | 488 std::set<BluetoothDiscoverySession*> discovery_sessions_; |
| 489 | 489 |
| 490 // Note: This should remain the last member so it'll be destroyed and | 490 // Note: This should remain the last member so it'll be destroyed and |
| 491 // invalidate its weak pointers before any other members are destroyed. | 491 // invalidate its weak pointers before any other members are destroyed. |
| 492 base::WeakPtrFactory<BluetoothAdapter> weak_ptr_factory_; | 492 base::WeakPtrFactory<BluetoothAdapter> weak_ptr_factory_; |
| 493 }; | 493 }; |
| 494 | 494 |
| 495 } // namespace device | 495 } // namespace device |
| 496 | 496 |
| 497 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ | 497 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ |
| OLD | NEW |