| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_ADAPTER_EXPERIMENTAL_CHROMEOS_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_EXPERIMENTAL_CHROMEOS_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_EXPERIMENTAL_CHROMEOS_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_EXPERIMENTAL_CHROMEOS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 91 |
| 92 // Remove the currently tracked adapter. IsPresent() will return false after | 92 // Remove the currently tracked adapter. IsPresent() will return false after |
| 93 // this is called. | 93 // this is called. |
| 94 void RemoveAdapter(); | 94 void RemoveAdapter(); |
| 95 | 95 |
| 96 // Announce to observers a change in the adapter state. | 96 // Announce to observers a change in the adapter state. |
| 97 void PoweredChanged(bool powered); | 97 void PoweredChanged(bool powered); |
| 98 void DiscoveringChanged(bool discovering); | 98 void DiscoveringChanged(bool discovering); |
| 99 void PresentChanged(bool present); | 99 void PresentChanged(bool present); |
| 100 | 100 |
| 101 // Announce to observers a change in device state that is not reflected by |
| 102 // its D-Bus properties. |
| 103 void NotifyDeviceChanged(BluetoothDeviceExperimentalChromeOS* device); |
| 104 |
| 101 // Called by dbus:: on completion of the powered property change. | 105 // Called by dbus:: on completion of the powered property change. |
| 102 void OnSetPowered(const base::Closure& callback, | 106 void OnSetPowered(const base::Closure& callback, |
| 103 const ErrorCallback& error_callback, | 107 const ErrorCallback& error_callback, |
| 104 bool success); | 108 bool success); |
| 105 | 109 |
| 106 // Called by dbus:: on completion of the D-Bus method call to start discovery. | 110 // Called by dbus:: on completion of the D-Bus method call to start discovery. |
| 107 void OnStartDiscovery(const base::Closure& callback); | 111 void OnStartDiscovery(const base::Closure& callback); |
| 108 void OnStartDiscoveryError(const ErrorCallback& error_callback, | 112 void OnStartDiscoveryError(const ErrorCallback& error_callback, |
| 109 const std::string& error_name, | 113 const std::string& error_name, |
| 110 const std::string& error_message); | 114 const std::string& error_message); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 124 // Note: This should remain the last member so it'll be destroyed and | 128 // Note: This should remain the last member so it'll be destroyed and |
| 125 // invalidate its weak pointers before any other members are destroyed. | 129 // invalidate its weak pointers before any other members are destroyed. |
| 126 base::WeakPtrFactory<BluetoothAdapterExperimentalChromeOS> weak_ptr_factory_; | 130 base::WeakPtrFactory<BluetoothAdapterExperimentalChromeOS> weak_ptr_factory_; |
| 127 | 131 |
| 128 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterExperimentalChromeOS); | 132 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterExperimentalChromeOS); |
| 129 }; | 133 }; |
| 130 | 134 |
| 131 } // namespace chromeos | 135 } // namespace chromeos |
| 132 | 136 |
| 133 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_EXPERIMENTAL_CHROMEOS_H_ | 137 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_EXPERIMENTAL_CHROMEOS_H_ |
| OLD | NEW |