OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_DEVICE_CHROMEOS_H | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H |
6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // Releases the current pairing object, any pairing-related method calls will | 81 // Releases the current pairing object, any pairing-related method calls will |
82 // be ignored. | 82 // be ignored. |
83 void EndPairing(); | 83 void EndPairing(); |
84 | 84 |
85 // Returns the current pairing object or NULL if no pairing is in progress. | 85 // Returns the current pairing object or NULL if no pairing is in progress. |
86 BluetoothPairingChromeOS* GetPairing() const; | 86 BluetoothPairingChromeOS* GetPairing() const; |
87 | 87 |
88 // Returns the object path of the device. | 88 // Returns the object path of the device. |
89 const dbus::ObjectPath& object_path() const { return object_path_; } | 89 const dbus::ObjectPath& object_path() const { return object_path_; } |
90 | 90 |
| 91 // Returns the adapter which owns this device instance. |
| 92 BluetoothAdapterChromeOS* adapter() const { return adapter_; } |
| 93 |
91 protected: | 94 protected: |
92 // BluetoothDevice override | 95 // BluetoothDevice override |
93 std::string GetDeviceName() const override; | 96 std::string GetDeviceName() const override; |
94 | 97 |
95 private: | 98 private: |
96 friend class BluetoothAdapterChromeOS; | 99 friend class BluetoothAdapterChromeOS; |
97 | 100 |
98 BluetoothDeviceChromeOS( | 101 BluetoothDeviceChromeOS( |
99 BluetoothAdapterChromeOS* adapter, | 102 BluetoothAdapterChromeOS* adapter, |
100 const dbus::ObjectPath& object_path, | 103 const dbus::ObjectPath& object_path, |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 // Note: This should remain the last member so it'll be destroyed and | 191 // Note: This should remain the last member so it'll be destroyed and |
189 // invalidate its weak pointers before any other members are destroyed. | 192 // invalidate its weak pointers before any other members are destroyed. |
190 base::WeakPtrFactory<BluetoothDeviceChromeOS> weak_ptr_factory_; | 193 base::WeakPtrFactory<BluetoothDeviceChromeOS> weak_ptr_factory_; |
191 | 194 |
192 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceChromeOS); | 195 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceChromeOS); |
193 }; | 196 }; |
194 | 197 |
195 } // namespace chromeos | 198 } // namespace chromeos |
196 | 199 |
197 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H | 200 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H |
OLD | NEW |