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 | |
94 protected: | 91 protected: |
95 // BluetoothDevice override | 92 // BluetoothDevice override |
96 std::string GetDeviceName() const override; | 93 std::string GetDeviceName() const override; |
97 | 94 |
98 private: | 95 private: |
99 friend class BluetoothAdapterChromeOS; | 96 friend class BluetoothAdapterChromeOS; |
100 | 97 |
101 BluetoothDeviceChromeOS( | 98 BluetoothDeviceChromeOS( |
102 BluetoothAdapterChromeOS* adapter, | 99 BluetoothAdapterChromeOS* adapter, |
103 const dbus::ObjectPath& object_path, | 100 const dbus::ObjectPath& object_path, |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 // Note: This should remain the last member so it'll be destroyed and | 188 // Note: This should remain the last member so it'll be destroyed and |
192 // invalidate its weak pointers before any other members are destroyed. | 189 // invalidate its weak pointers before any other members are destroyed. |
193 base::WeakPtrFactory<BluetoothDeviceChromeOS> weak_ptr_factory_; | 190 base::WeakPtrFactory<BluetoothDeviceChromeOS> weak_ptr_factory_; |
194 | 191 |
195 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceChromeOS); | 192 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceChromeOS); |
196 }; | 193 }; |
197 | 194 |
198 } // namespace chromeos | 195 } // namespace chromeos |
199 | 196 |
200 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H | 197 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H |
OLD | NEW |