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

Unified Diff: device/bluetooth/bluetooth_profile_mac.h

Issue 229463003: MacOS implementation of BluetoothSocket. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build error on OSX SDK < 10.7. Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/bluetooth/bluetooth_device_mac.mm ('k') | device/bluetooth/bluetooth_profile_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_profile_mac.h
diff --git a/device/bluetooth/bluetooth_profile_mac.h b/device/bluetooth/bluetooth_profile_mac.h
index bad10ce527c27d25129f95625db706b8ea85a12a..673abeb4969da7a777203ba1649077db387ae249 100644
--- a/device/bluetooth/bluetooth_profile_mac.h
+++ b/device/bluetooth/bluetooth_profile_mac.h
@@ -18,6 +18,10 @@
class IOBluetoothDevice;
#endif
+namespace base {
+class SequencedTaskRunner;
+} // namespace base
+
namespace device {
class BluetoothProfileMac : public BluetoothProfile {
@@ -27,10 +31,15 @@ class BluetoothProfileMac : public BluetoothProfile {
virtual void SetConnectionCallback(
const ConnectionCallback& callback) OVERRIDE;
- // Makes an outgoing connection to |device|.
- // This method runs |socket_callback_| with the socket and returns true if the
- // connection is made successfully.
- bool Connect(IOBluetoothDevice* device);
+ typedef base::Callback<void(const std::string&)> ErrorCallback;
+
+ // Makes an outgoing connection to |device|, calling |callback| on succes or
+ // |error_callback| on error. If successful, this method also calls
+ // |connection_callback_| before calling |callback|.
+ void Connect(const scoped_refptr<base::SequencedTaskRunner>& ui_task_runner,
+ IOBluetoothDevice* device,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback);
private:
friend BluetoothProfile;
« no previous file with comments | « device/bluetooth/bluetooth_device_mac.mm ('k') | device/bluetooth/bluetooth_profile_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698