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

Unified Diff: chrome/browser/extensions/api/bluetooth/bluetooth_api.h

Issue 10007008: Add support for creating bluetooth RFCOMM sockets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reupload off of proper base Created 8 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
Index: chrome/browser/extensions/api/bluetooth/bluetooth_api.h
diff --git a/chrome/browser/extensions/api/bluetooth/bluetooth_api.h b/chrome/browser/extensions/api/bluetooth/bluetooth_api.h
index b36accf0bfa424acf978adb8d08bd0ed90be119e..5076bfaccbdefe44f3f6fe5698b9ef53683fa1a5 100644
--- a/chrome/browser/extensions/api/bluetooth/bluetooth_api.h
+++ b/chrome/browser/extensions/api/bluetooth/bluetooth_api.h
@@ -9,12 +9,14 @@
#include "chrome/browser/extensions/extension_function.h"
#if defined(OS_CHROMEOS)
+#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
namespace chromeos {
class BluetoothAdapter;
class BluetoothDevice;
+class BluetoothSocket;
} // namespace chromeos
#endif
@@ -88,6 +90,20 @@ class BluetoothGetDevicesWithServiceNameFunction
#endif
};
+class BluetoothConnectFunction : public BluetoothExtensionFunction {
+ public:
+ virtual bool RunImpl() OVERRIDE;
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.bluetooth.connect")
+
+ private:
+#if defined(OS_CHROMEOS)
+ void ConnectToServiceCallback(
+ const chromeos::BluetoothDevice* device,
+ const std::string& service_uuid,
+ scoped_refptr<chromeos::BluetoothSocket> socket);
+#endif
+};
+
class BluetoothDisconnectFunction : public BluetoothExtensionFunction {
public:
virtual bool RunImpl() OVERRIDE;
@@ -122,12 +138,6 @@ class BluetoothWriteFunction : public BluetoothExtensionFunction {
DECLARE_EXTENSION_FUNCTION_NAME("experimental.bluetooth.write")
};
-class BluetoothConnectFunction : public BluetoothExtensionFunction {
- public:
- virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.bluetooth.connect")
-};
-
} // namespace api
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698