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

Side by Side Diff: device/bluetooth/bluetooth_device_chromeos.cc

Issue 336933002: device/bluetooth: Introduce BluetoothGattConnection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: GattConnectionCallback now takes in a scoped_ptr Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 BluetoothSocketChromeOS::CreateBluetoothSocket( 443 BluetoothSocketChromeOS::CreateBluetoothSocket(
444 ui_task_runner_, 444 ui_task_runner_,
445 socket_thread_, 445 socket_thread_,
446 NULL, 446 NULL,
447 net::NetLog::Source()); 447 net::NetLog::Source());
448 socket->Connect(this, uuid, 448 socket->Connect(this, uuid,
449 base::Bind(callback, socket), 449 base::Bind(callback, socket),
450 error_callback); 450 error_callback);
451 } 451 }
452 452
453 void BluetoothDeviceChromeOS::CreateGattConnection(
454 const GattConnectionCallback& callback,
455 const ConnectErrorCallback& error_callback) {
456 // TODO(armansito): Implement.
457 error_callback.Run(ERROR_UNKNOWN);
458 }
459
453 void BluetoothDeviceChromeOS::StartConnectionMonitor( 460 void BluetoothDeviceChromeOS::StartConnectionMonitor(
454 const base::Closure& callback, 461 const base::Closure& callback,
455 const ErrorCallback& error_callback) { 462 const ErrorCallback& error_callback) {
456 DBusThreadManager::Get()->GetBluetoothDeviceClient()->StartConnectionMonitor( 463 DBusThreadManager::Get()->GetBluetoothDeviceClient()->StartConnectionMonitor(
457 object_path_, 464 object_path_,
458 base::Bind(&BluetoothDeviceChromeOS::OnStartConnectionMonitor, 465 base::Bind(&BluetoothDeviceChromeOS::OnStartConnectionMonitor,
459 weak_ptr_factory_.GetWeakPtr(), 466 weak_ptr_factory_.GetWeakPtr(),
460 callback), 467 callback),
461 base::Bind(&BluetoothDeviceChromeOS::OnStartConnectionMonitorError, 468 base::Bind(&BluetoothDeviceChromeOS::OnStartConnectionMonitorError,
462 weak_ptr_factory_.GetWeakPtr(), 469 weak_ptr_factory_.GetWeakPtr(),
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 void BluetoothDeviceChromeOS::OnForgetError( 699 void BluetoothDeviceChromeOS::OnForgetError(
693 const ErrorCallback& error_callback, 700 const ErrorCallback& error_callback,
694 const std::string& error_name, 701 const std::string& error_name,
695 const std::string& error_message) { 702 const std::string& error_message) {
696 LOG(WARNING) << object_path_.value() << ": Failed to remove device: " 703 LOG(WARNING) << object_path_.value() << ": Failed to remove device: "
697 << error_name << ": " << error_message; 704 << error_name << ": " << error_message;
698 error_callback.Run(); 705 error_callback.Run();
699 } 706 }
700 707
701 } // namespace chromeos 708 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698