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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 void OnPairError(const ConnectErrorCallback& error_callback, | 124 void OnPairError(const ConnectErrorCallback& error_callback, |
125 const std::string& error_name, | 125 const std::string& error_name, |
126 const std::string& error_message); | 126 const std::string& error_message); |
127 | 127 |
128 // Called by dbus:: on failure of the D-Bus method call to cancel pairing, | 128 // Called by dbus:: on failure of the D-Bus method call to cancel pairing, |
129 // there is no matching completion call since we don't do anything special | 129 // there is no matching completion call since we don't do anything special |
130 // in that case. | 130 // in that case. |
131 void OnCancelPairingError(const std::string& error_name, | 131 void OnCancelPairingError(const std::string& error_name, |
132 const std::string& error_message); | 132 const std::string& error_message); |
133 | 133 |
134 // Called by dbus:: on completion of the trusted property change. | 134 // Internal method to set the device as trusted. Trusted devices can connect |
| 135 // to us automatically, and we can connect to them after rebooting; it also |
| 136 // causes the device to be remembered by the stack even if not paired. |
| 137 // |success| to the callback indicates whether or not the request succeeded. |
| 138 void SetTrusted(); |
135 void OnSetTrusted(bool success); | 139 void OnSetTrusted(bool success); |
136 | 140 |
137 // Internal method to unregister the pairing agent and method called by dbus:: | 141 // Internal method to unregister the pairing agent and method called by dbus:: |
138 // on failure of the D-Bus method call. No completion call as success is | 142 // on failure of the D-Bus method call. No completion call as success is |
139 // ignored. | 143 // ignored. |
140 void UnregisterAgent(); | 144 void UnregisterAgent(); |
141 void OnUnregisterAgentError(const std::string& error_name, | 145 void OnUnregisterAgentError(const std::string& error_name, |
142 const std::string& error_message); | 146 const std::string& error_message); |
143 | 147 |
144 // Called by dbus:: on completion of the D-Bus method call to disconnect the | 148 // Called by dbus:: on completion of the D-Bus method call to disconnect the |
(...skipping 46 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 | 195 // Note: This should remain the last member so it'll be destroyed and |
192 // invalidate its weak pointers before any other members are destroyed. | 196 // invalidate its weak pointers before any other members are destroyed. |
193 base::WeakPtrFactory<BluetoothDeviceExperimentalChromeOS> weak_ptr_factory_; | 197 base::WeakPtrFactory<BluetoothDeviceExperimentalChromeOS> weak_ptr_factory_; |
194 | 198 |
195 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceExperimentalChromeOS); | 199 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceExperimentalChromeOS); |
196 }; | 200 }; |
197 | 201 |
198 } // namespace chromeos | 202 } // namespace chromeos |
199 | 203 |
200 #endif /* DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_EXPERIMENTAL_CHROMEOS_H */ | 204 #endif /* DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_EXPERIMENTAL_CHROMEOS_H */ |
OLD | NEW |