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

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

Issue 10381120: Implement chrome.experimental.bluetooth.connect (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 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 e215ba7ee1a68b9433540e25732aaa511d07f385..d25c6309e1d9b77b67963858f7ae5472fda96bd5 100644
--- a/chrome/browser/extensions/api/bluetooth/bluetooth_api.h
+++ b/chrome/browser/extensions/api/bluetooth/bluetooth_api.h
@@ -9,10 +9,14 @@
#include "chrome/browser/extensions/extension_function.h"
#if defined(OS_CHROMEOS)
+#include "base/memory/ref_counted.h"
+
namespace chromeos {
class BluetoothAdapter;
class BluetoothDevice;
+class BluetoothSocket;
+class ExtensionBluetoothEventRouter;
} // namespace chromeos
#endif
@@ -25,6 +29,7 @@ class BluetoothExtensionFunction : public SyncExtensionFunction {
virtual ~BluetoothExtensionFunction() {}
#if defined(OS_CHROMEOS)
+ chromeos::ExtensionBluetoothEventRouter* event_router();
const chromeos::BluetoothAdapter* adapter() const;
chromeos::BluetoothAdapter* GetMutableAdapter();
#endif
@@ -35,6 +40,7 @@ class AsyncBluetoothExtensionFunction : public AsyncExtensionFunction {
virtual ~AsyncBluetoothExtensionFunction() {}
#if defined(OS_CHROMEOS)
+ chromeos::ExtensionBluetoothEventRouter* event_router();
const chromeos::BluetoothAdapter* adapter() const;
chromeos::BluetoothAdapter* GetMutableAdapter();
#endif
@@ -111,6 +117,20 @@ class BluetoothGetDevicesWithServiceNameFunction
#endif
};
+class BluetoothConnectFunction : public AsyncBluetoothExtensionFunction {
+ 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:
DECLARE_EXTENSION_FUNCTION_NAME("experimental.bluetooth.disconnect")
@@ -170,17 +190,6 @@ class BluetoothWriteFunction : public BluetoothExtensionFunction {
virtual bool RunImpl() OVERRIDE;
};
-class BluetoothConnectFunction : public BluetoothExtensionFunction {
- public:
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.bluetooth.connect")
-
- protected:
- virtual ~BluetoothConnectFunction() {}
-
- // ExtensionFunction:
- virtual bool RunImpl() OVERRIDE;
-};
-
} // namespace api
} // namespace extensions
« no previous file with comments | « chrome/browser/chromeos/extensions/bluetooth_event_router.cc ('k') | chrome/browser/extensions/api/bluetooth/bluetooth_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698