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

Unified Diff: device/bluetooth/bluetooth_profile_win.h

Issue 180163009: chrome.bluetooth API improvements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address code review feedback, simplify threading model. Created 6 years, 9 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
Index: device/bluetooth/bluetooth_profile_win.h
diff --git a/device/bluetooth/bluetooth_profile_win.h b/device/bluetooth/bluetooth_profile_win.h
index a102bf5069a769964e082f63e6f0658e473ce7c8..efecd186bf325ede953d3f65447350dea8bda341 100644
--- a/device/bluetooth/bluetooth_profile_win.h
+++ b/device/bluetooth/bluetooth_profile_win.h
@@ -8,10 +8,12 @@
#include <string>
#include "device/bluetooth/bluetooth_profile.h"
+#include "net/base/net_log.h"
namespace device {
class BluetoothDeviceWin;
+class BluetoothSocketThreadWin;
class BluetoothProfileWin : public BluetoothProfile {
public:
@@ -20,7 +22,15 @@ class BluetoothProfileWin : public BluetoothProfile {
virtual void SetConnectionCallback(
const ConnectionCallback& callback) OVERRIDE;
- bool Connect(const BluetoothDeviceWin* device);
+ typedef base::Callback<void(const std::string&)> ErrorCallback;
+
+ void Connect(const BluetoothDeviceWin* device,
+ scoped_refptr<base::SequencedTaskRunner> ui_task_runner,
+ scoped_refptr<BluetoothSocketThreadWin> socket_thread,
+ net::NetLog* net_log,
+ const net::NetLog::Source& source,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback);
private:
friend BluetoothProfile;
@@ -31,6 +41,8 @@ class BluetoothProfileWin : public BluetoothProfile {
const std::string uuid_;
const std::string name_;
ConnectionCallback connection_callback_;
+
+ DISALLOW_COPY_AND_ASSIGN(BluetoothProfileWin);
};
} // namespace device

Powered by Google App Engine
This is Rietveld 408576698