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