| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "device/bluetooth/bluetooth_device_chromeos.h" | 5 #include "device/bluetooth/bluetooth_device_chromeos.h" |
| 6 | 6 |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 BluetoothSocketChromeOS::CreateBluetoothSocket( | 451 BluetoothSocketChromeOS::CreateBluetoothSocket( |
| 452 ui_task_runner_, | 452 ui_task_runner_, |
| 453 socket_thread_, | 453 socket_thread_, |
| 454 NULL, | 454 NULL, |
| 455 net::NetLog::Source()); | 455 net::NetLog::Source()); |
| 456 socket->Connect(this, uuid, | 456 socket->Connect(this, uuid, |
| 457 base::Bind(callback, socket), | 457 base::Bind(callback, socket), |
| 458 error_callback); | 458 error_callback); |
| 459 } | 459 } |
| 460 | 460 |
| 461 void BluetoothDeviceChromeOS::SetOutOfBandPairingData( | |
| 462 const device::BluetoothOutOfBandPairingData& data, | |
| 463 const base::Closure& callback, | |
| 464 const ErrorCallback& error_callback) { | |
| 465 // TODO(keybuk): implement | |
| 466 error_callback.Run(); | |
| 467 } | |
| 468 | |
| 469 void BluetoothDeviceChromeOS::ClearOutOfBandPairingData( | |
| 470 const base::Closure& callback, | |
| 471 const ErrorCallback& error_callback) { | |
| 472 // TODO(keybuk): implement | |
| 473 error_callback.Run(); | |
| 474 } | |
| 475 | |
| 476 void BluetoothDeviceChromeOS::StartConnectionMonitor( | 461 void BluetoothDeviceChromeOS::StartConnectionMonitor( |
| 477 const base::Closure& callback, | 462 const base::Closure& callback, |
| 478 const ErrorCallback& error_callback) { | 463 const ErrorCallback& error_callback) { |
| 479 DBusThreadManager::Get()->GetBluetoothDeviceClient()->StartConnectionMonitor( | 464 DBusThreadManager::Get()->GetBluetoothDeviceClient()->StartConnectionMonitor( |
| 480 object_path_, | 465 object_path_, |
| 481 base::Bind(&BluetoothDeviceChromeOS::OnStartConnectionMonitor, | 466 base::Bind(&BluetoothDeviceChromeOS::OnStartConnectionMonitor, |
| 482 weak_ptr_factory_.GetWeakPtr(), | 467 weak_ptr_factory_.GetWeakPtr(), |
| 483 callback), | 468 callback), |
| 484 base::Bind(&BluetoothDeviceChromeOS::OnStartConnectionMonitorError, | 469 base::Bind(&BluetoothDeviceChromeOS::OnStartConnectionMonitorError, |
| 485 weak_ptr_factory_.GetWeakPtr(), | 470 weak_ptr_factory_.GetWeakPtr(), |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 void BluetoothDeviceChromeOS::OnForgetError( | 700 void BluetoothDeviceChromeOS::OnForgetError( |
| 716 const ErrorCallback& error_callback, | 701 const ErrorCallback& error_callback, |
| 717 const std::string& error_name, | 702 const std::string& error_name, |
| 718 const std::string& error_message) { | 703 const std::string& error_message) { |
| 719 LOG(WARNING) << object_path_.value() << ": Failed to remove device: " | 704 LOG(WARNING) << object_path_.value() << ": Failed to remove device: " |
| 720 << error_name << ": " << error_message; | 705 << error_name << ": " << error_message; |
| 721 error_callback.Run(); | 706 error_callback.Run(); |
| 722 } | 707 } |
| 723 | 708 |
| 724 } // namespace chromeos | 709 } // namespace chromeos |
| OLD | NEW |