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

Unified Diff: device/bluetooth/bluetooth_socket_chromeos.h

Issue 180163009: chrome.bluetooth API improvements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address code review feedback. 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_socket_chromeos.h
diff --git a/device/bluetooth/bluetooth_socket_chromeos.h b/device/bluetooth/bluetooth_socket_chromeos.h
index 1c52c679f0e76b2a343e5e2477cfa0eff56cde18..c3a2e189c36a01b4556821c8d317901e03eaebf3 100644
--- a/device/bluetooth/bluetooth_socket_chromeos.h
+++ b/device/bluetooth/bluetooth_socket_chromeos.h
@@ -13,16 +13,11 @@
#include "device/bluetooth/bluetooth_socket.h"
namespace dbus {
-
class FileDescriptor;
-
} // namespace dbus
namespace net {
-
-class DrainableIOBuffer;
-class GrowableIOBuffer;
-
+class IOBuffer;
} // namespace net
namespace chromeos {
@@ -32,10 +27,18 @@ namespace chromeos {
class CHROMEOS_EXPORT BluetoothSocketChromeOS
: public device::BluetoothSocket {
public:
- // BluetoothSocket override.
- virtual bool Receive(net::GrowableIOBuffer* buffer) OVERRIDE;
- virtual bool Send(net::DrainableIOBuffer* buffer) OVERRIDE;
- virtual std::string GetLastErrorMessage() const OVERRIDE;
+ // BluetoothSocket override
+ virtual void Connect(const base::Closure& success_callback,
+ const ErrorCompletionCallback& error_callback) OVERRIDE;
+ virtual void Disconnect(const base::Closure& callback) OVERRIDE;
+ virtual void Receive(int count,
+ const ReceiveCompletionCallback& success_callback,
+ const ReceiveErrorCompletionCallback& error_callback)
+ OVERRIDE;
+ virtual void Send(scoped_refptr<net::IOBuffer> buffer,
+ int buffer_size,
+ const SendCompletionCallback& success_callback,
+ const ErrorCompletionCallback& error_callback) OVERRIDE;
// Create an instance of a BluetoothSocket from the passed file descriptor
// received over D-Bus in |fd|, the descriptor will be taken from that object

Powered by Google App Engine
This is Rietveld 408576698