Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: device/bluetooth/bluetooth_device_experimental_chromeos.h

Issue 14487002: Bluetooth: Profile support for Chrome OS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Handle EINTR. Detect disconnection during Receive and Send Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 168
169 // Run any outstanding pairing callbacks passing |status| as the result of 169 // Run any outstanding pairing callbacks passing |status| as the result of
170 // pairing. Returns true if any callbacks were run, false if not. 170 // pairing. Returns true if any callbacks were run, false if not.
171 bool RunPairingCallbacks(Status status); 171 bool RunPairingCallbacks(Status status);
172 172
173 // Record the result of pairing as a UMA histogram metric; |success| should 173 // Record the result of pairing as a UMA histogram metric; |success| should
174 // be true if pairing succeeded, and |false| if not - in which case 174 // be true if pairing succeeded, and |false| if not - in which case
175 // |error_code| specifies the reason for failure. 175 // |error_code| specifies the reason for failure.
176 void RecordPairingResult(bool success, ConnectErrorCode error_code); 176 void RecordPairingResult(bool success, ConnectErrorCode error_code);
177 177
178 // Called by dbus:: on completion of the D-Bus method call to
179 // connect a peofile.
180 void OnConnectProfile(device::BluetoothProfile* profile,
181 const base::Closure& callback);
182 void OnConnectProfileError(device::BluetoothProfile* profile,
183 const ErrorCallback& error_callback,
184 const std::string& error_name,
185 const std::string& error_message);
186
178 // Return the object path of the device; used by 187 // Return the object path of the device; used by
179 // BluetoothAdapterExperimentalChromeOS 188 // BluetoothAdapterExperimentalChromeOS
180 const dbus::ObjectPath& object_path() const { return object_path_; } 189 const dbus::ObjectPath& object_path() const { return object_path_; }
181 190
182 // The adapter that owns this device instance. 191 // The adapter that owns this device instance.
183 BluetoothAdapterExperimentalChromeOS* adapter_; 192 BluetoothAdapterExperimentalChromeOS* adapter_;
184 193
185 // The dbus object path of the device object. 194 // The dbus object path of the device object.
186 dbus::ObjectPath object_path_; 195 dbus::ObjectPath object_path_;
187 196
(...skipping 23 matching lines...) Expand all
211 // Note: This should remain the last member so it'll be destroyed and 220 // Note: This should remain the last member so it'll be destroyed and
212 // invalidate its weak pointers before any other members are destroyed. 221 // invalidate its weak pointers before any other members are destroyed.
213 base::WeakPtrFactory<BluetoothDeviceExperimentalChromeOS> weak_ptr_factory_; 222 base::WeakPtrFactory<BluetoothDeviceExperimentalChromeOS> weak_ptr_factory_;
214 223
215 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceExperimentalChromeOS); 224 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceExperimentalChromeOS);
216 }; 225 };
217 226
218 } // namespace chromeos 227 } // namespace chromeos
219 228
220 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_EXPERIMENTAL_CHROMEOS_H 229 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_EXPERIMENTAL_CHROMEOS_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698