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_CHROMEOS_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_CHROMEOS_H_ |
6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_CHROMEOS_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_CHROMEOS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 // |callback| and |error_callback| are the callbacks passed to SetPowered(). | 102 // |callback| and |error_callback| are the callbacks passed to SetPowered(). |
103 void OnSetPowered(const base::Closure& callback, | 103 void OnSetPowered(const base::Closure& callback, |
104 const ErrorCallback& error_callback, | 104 const ErrorCallback& error_callback, |
105 bool success); | 105 bool success); |
106 | 106 |
107 // Updates the tracked state of the adapter's radio power to |powered| | 107 // Updates the tracked state of the adapter's radio power to |powered| |
108 // and notifies observers. Called on receipt of a property changed signal, | 108 // and notifies observers. Called on receipt of a property changed signal, |
109 // and directly using values obtained from properties. | 109 // and directly using values obtained from properties. |
110 void PoweredChanged(bool powered); | 110 void PoweredChanged(bool powered); |
111 | 111 |
| 112 // Notifies observers of a change in the device |device|. Used to signal |
| 113 // changes initiated from the BluetoothDeviceChromeOS itself. |
| 114 void NotifyDeviceChanged(BluetoothDeviceChromeOS* device); |
| 115 |
112 // Called by BluetoothAdapterClient in response to the method call sent | 116 // Called by BluetoothAdapterClient in response to the method call sent |
113 // by StartDiscovering(), |callback| and |error_callback| are the callbacks | 117 // by StartDiscovering(), |callback| and |error_callback| are the callbacks |
114 // provided to that method. | 118 // provided to that method. |
115 void OnStartDiscovery(const base::Closure& callback, | 119 void OnStartDiscovery(const base::Closure& callback, |
116 const ErrorCallback& error_callback, | 120 const ErrorCallback& error_callback, |
117 const dbus::ObjectPath& adapter_path, | 121 const dbus::ObjectPath& adapter_path, |
118 bool success); | 122 bool success); |
119 | 123 |
120 // Called by BluetoothAdapterClient in response to the method call sent | 124 // Called by BluetoothAdapterClient in response to the method call sent |
121 // by StopDiscovering(), |callback| and |error_callback| are the callbacks | 125 // by StopDiscovering(), |callback| and |error_callback| are the callbacks |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 // Note: This should remain the last member so it'll be destroyed and | 232 // Note: This should remain the last member so it'll be destroyed and |
229 // invalidate its weak pointers before any other members are destroyed. | 233 // invalidate its weak pointers before any other members are destroyed. |
230 base::WeakPtrFactory<BluetoothAdapterChromeOS> weak_ptr_factory_; | 234 base::WeakPtrFactory<BluetoothAdapterChromeOS> weak_ptr_factory_; |
231 | 235 |
232 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterChromeOS); | 236 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterChromeOS); |
233 }; | 237 }; |
234 | 238 |
235 } // namespace chromeos | 239 } // namespace chromeos |
236 | 240 |
237 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_CHROMEOS_H_ | 241 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_CHROMEOS_H_ |
OLD | NEW |