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_DEVICE_EXPERIMENTAL_CHROMEOS_H | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_EXPERIMENTAL_CHROMEOS_H |
6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_EXPERIMENTAL_CHROMEOS_H | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_EXPERIMENTAL_CHROMEOS_H |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 // there is no matching completion call since this object is deleted in the | 166 // there is no matching completion call since this object is deleted in the |
167 // process of unpairing. | 167 // process of unpairing. |
168 void OnForgetError(const ErrorCallback& error_callback, | 168 void OnForgetError(const ErrorCallback& error_callback, |
169 const std::string& error_name, | 169 const std::string& error_name, |
170 const std::string& error_message); | 170 const std::string& error_message); |
171 | 171 |
172 // Run any outstanding pairing callbacks passing |status| as the result of | 172 // Run any outstanding pairing callbacks passing |status| as the result of |
173 // pairing. Returns true if any callbacks were run, false if not. | 173 // pairing. Returns true if any callbacks were run, false if not. |
174 bool RunPairingCallbacks(Status status); | 174 bool RunPairingCallbacks(Status status); |
175 | 175 |
| 176 // Called by dbus:: on completion of the D-Bus method call to |
| 177 // connect a peofile. |
| 178 void OnConnectProfile(device::BluetoothProfile* profile, |
| 179 const base::Closure& callback); |
| 180 void OnConnectProfileError(device::BluetoothProfile* profile, |
| 181 const ErrorCallback& error_callback, |
| 182 const std::string& error_name, |
| 183 const std::string& error_message); |
| 184 |
176 // Return the object path of the device; used by | 185 // Return the object path of the device; used by |
177 // BluetoothAdapterExperimentalChromeOS | 186 // BluetoothAdapterExperimentalChromeOS |
178 const dbus::ObjectPath& object_path() const { return object_path_; } | 187 const dbus::ObjectPath& object_path() const { return object_path_; } |
179 | 188 |
180 // The adapter that owns this device instance. | 189 // The adapter that owns this device instance. |
181 BluetoothAdapterExperimentalChromeOS* adapter_; | 190 BluetoothAdapterExperimentalChromeOS* adapter_; |
182 | 191 |
183 // The dbus object path of the device object. | 192 // The dbus object path of the device object. |
184 dbus::ObjectPath object_path_; | 193 dbus::ObjectPath object_path_; |
185 | 194 |
(...skipping 23 matching lines...) Expand all Loading... |
209 // Note: This should remain the last member so it'll be destroyed and | 218 // Note: This should remain the last member so it'll be destroyed and |
210 // invalidate its weak pointers before any other members are destroyed. | 219 // invalidate its weak pointers before any other members are destroyed. |
211 base::WeakPtrFactory<BluetoothDeviceExperimentalChromeOS> weak_ptr_factory_; | 220 base::WeakPtrFactory<BluetoothDeviceExperimentalChromeOS> weak_ptr_factory_; |
212 | 221 |
213 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceExperimentalChromeOS); | 222 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceExperimentalChromeOS); |
214 }; | 223 }; |
215 | 224 |
216 } // namespace chromeos | 225 } // namespace chromeos |
217 | 226 |
218 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_EXPERIMENTAL_CHROMEOS_H | 227 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_EXPERIMENTAL_CHROMEOS_H |
OLD | NEW |