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

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

Issue 1284073002: bluetooth: Add adapter to BluetoothDevice (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bt-drop-callback-
Patch Set: Updated patchset dependency Created 5 years, 4 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
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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 } // namespace 119 } // namespace
120 120
121 namespace chromeos { 121 namespace chromeos {
122 122
123 BluetoothDeviceChromeOS::BluetoothDeviceChromeOS( 123 BluetoothDeviceChromeOS::BluetoothDeviceChromeOS(
124 BluetoothAdapterChromeOS* adapter, 124 BluetoothAdapterChromeOS* adapter,
125 const dbus::ObjectPath& object_path, 125 const dbus::ObjectPath& object_path,
126 scoped_refptr<base::SequencedTaskRunner> ui_task_runner, 126 scoped_refptr<base::SequencedTaskRunner> ui_task_runner,
127 scoped_refptr<device::BluetoothSocketThread> socket_thread) 127 scoped_refptr<device::BluetoothSocketThread> socket_thread)
128 : adapter_(adapter), 128 : BluetoothDevice(adapter),
129 adapter_(adapter),
Jeffrey Yasskin 2015/08/19 22:19:04 Would it make sense to remove this member, and ins
scheib 2015/09/13 02:40:11 Done.
129 object_path_(object_path), 130 object_path_(object_path),
130 num_connecting_calls_(0), 131 num_connecting_calls_(0),
131 connection_monitor_started_(false), 132 connection_monitor_started_(false),
132 ui_task_runner_(ui_task_runner), 133 ui_task_runner_(ui_task_runner),
133 socket_thread_(socket_thread), 134 socket_thread_(socket_thread),
134 weak_ptr_factory_(this) { 135 weak_ptr_factory_(this) {
135 DBusThreadManager::Get()->GetBluetoothGattServiceClient()->AddObserver(this); 136 DBusThreadManager::Get()->GetBluetoothGattServiceClient()->AddObserver(this);
136 137
137 // Add all known GATT services. 138 // Add all known GATT services.
138 const std::vector<dbus::ObjectPath> gatt_services = 139 const std::vector<dbus::ObjectPath> gatt_services =
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 void BluetoothDeviceChromeOS::OnForgetError( 713 void BluetoothDeviceChromeOS::OnForgetError(
713 const ErrorCallback& error_callback, 714 const ErrorCallback& error_callback,
714 const std::string& error_name, 715 const std::string& error_name,
715 const std::string& error_message) { 716 const std::string& error_message) {
716 LOG(WARNING) << object_path_.value() << ": Failed to remove device: " 717 LOG(WARNING) << object_path_.value() << ": Failed to remove device: "
717 << error_name << ": " << error_message; 718 << error_name << ": " << error_message;
718 error_callback.Run(); 719 error_callback.Run();
719 } 720 }
720 721
721 } // namespace chromeos 722 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698