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

Unified Diff: device/bluetooth/bluetooth_adapter_chromeos.cc

Issue 276573004: Bluetooth: Implement new socket API for Chrome OS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix DCHECK nits Created 6 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
« no previous file with comments | « device/bluetooth/bluetooth_adapter_chromeos.h ('k') | device/bluetooth/bluetooth_device_chromeos.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_adapter_chromeos.cc
diff --git a/device/bluetooth/bluetooth_adapter_chromeos.cc b/device/bluetooth/bluetooth_adapter_chromeos.cc
index 3b803c9b2cd35e6daa38154535ee67dc01d38f14..71fdf62549d95696b1c0dca3ca319244b23873ce 100644
--- a/device/bluetooth/bluetooth_adapter_chromeos.cc
+++ b/device/bluetooth/bluetooth_adapter_chromeos.cc
@@ -243,8 +243,21 @@ void BluetoothAdapterChromeOS::CreateRfcommService(
bool insecure,
const CreateServiceCallback& callback,
const CreateServiceErrorCallback& error_callback) {
- // TODO(keybuk): implement.
- NOTIMPLEMENTED();
+ VLOG(1) << object_path_.value() << ": Creating RFCOMM service: "
+ << uuid.canonical_value();
+ scoped_refptr<BluetoothSocketChromeOS> socket =
+ BluetoothSocketChromeOS::CreateBluetoothSocket(
+ ui_task_runner_,
+ socket_thread_,
+ NULL,
+ net::NetLog::Source());
+ socket->Listen(this,
+ BluetoothSocketChromeOS::kRfcomm,
+ uuid,
+ channel,
+ insecure,
+ base::Bind(callback, socket),
+ error_callback);
}
void BluetoothAdapterChromeOS::CreateL2capService(
@@ -252,8 +265,21 @@ void BluetoothAdapterChromeOS::CreateL2capService(
int psm,
const CreateServiceCallback& callback,
const CreateServiceErrorCallback& error_callback) {
- // TODO(keybuk): implement.
- NOTIMPLEMENTED();
+ VLOG(1) << object_path_.value() << ": Creating L2CAP service: "
+ << uuid.canonical_value();
+ scoped_refptr<BluetoothSocketChromeOS> socket =
+ BluetoothSocketChromeOS::CreateBluetoothSocket(
+ ui_task_runner_,
+ socket_thread_,
+ NULL,
+ net::NetLog::Source());
+ socket->Listen(this,
+ BluetoothSocketChromeOS::kL2cap,
+ uuid,
+ psm,
+ false,
+ base::Bind(callback, socket),
+ error_callback);
}
void BluetoothAdapterChromeOS::RemovePairingDelegateInternal(
« no previous file with comments | « device/bluetooth/bluetooth_adapter_chromeos.h ('k') | device/bluetooth/bluetooth_device_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698