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

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

Issue 11884027: Separated BluetoothServiceRecord interface from BluetoothServiceRecordChromeOs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 10 matching lines...) Expand all
21 #include "chromeos/dbus/bluetooth_device_client.h" 21 #include "chromeos/dbus/bluetooth_device_client.h"
22 #include "chromeos/dbus/bluetooth_input_client.h" 22 #include "chromeos/dbus/bluetooth_input_client.h"
23 #include "chromeos/dbus/bluetooth_out_of_band_client.h" 23 #include "chromeos/dbus/bluetooth_out_of_band_client.h"
24 #include "chromeos/dbus/dbus_thread_manager.h" 24 #include "chromeos/dbus/dbus_thread_manager.h"
25 #include "chromeos/dbus/introspectable_client.h" 25 #include "chromeos/dbus/introspectable_client.h"
26 #include "dbus/bus.h" 26 #include "dbus/bus.h"
27 #include "dbus/object_path.h" 27 #include "dbus/object_path.h"
28 #include "device/bluetooth/bluetooth_adapter_chromeos.h" 28 #include "device/bluetooth/bluetooth_adapter_chromeos.h"
29 #include "device/bluetooth/bluetooth_out_of_band_pairing_data.h" 29 #include "device/bluetooth/bluetooth_out_of_band_pairing_data.h"
30 #include "device/bluetooth/bluetooth_service_record.h" 30 #include "device/bluetooth/bluetooth_service_record.h"
31 #include "device/bluetooth/bluetooth_service_record_chromeos.h"
31 #include "device/bluetooth/bluetooth_socket_chromeos.h" 32 #include "device/bluetooth/bluetooth_socket_chromeos.h"
32 #include "device/bluetooth/bluetooth_utils.h" 33 #include "device/bluetooth/bluetooth_utils.h"
33 #include "third_party/cros_system_api/dbus/service_constants.h" 34 #include "third_party/cros_system_api/dbus/service_constants.h"
34 35
35 using device::BluetoothDevice; 36 using device::BluetoothDevice;
36 using device::BluetoothOutOfBandPairingData; 37 using device::BluetoothOutOfBandPairingData;
37 using device::BluetoothServiceRecord; 38 using device::BluetoothServiceRecord;
39 using device::BluetoothServiceRecordChromeOs;
38 using device::BluetoothSocket; 40 using device::BluetoothSocket;
39 41
40 namespace chromeos { 42 namespace chromeos {
bryeung 2013/01/14 20:21:46 you declared BluetoothDeviceChromeOs in the device
youngki 2013/01/14 20:37:57 Done.
41 43
42 BluetoothDeviceChromeOs::BluetoothDeviceChromeOs( 44 BluetoothDeviceChromeOs::BluetoothDeviceChromeOs(
43 BluetoothAdapterChromeOs* adapter) 45 BluetoothAdapterChromeOs* adapter)
44 : BluetoothDevice(), 46 : BluetoothDevice(),
45 adapter_(adapter), 47 adapter_(adapter),
46 pairing_delegate_(NULL), 48 pairing_delegate_(NULL),
47 connecting_applications_counter_(0), 49 connecting_applications_counter_(0),
48 weak_ptr_factory_(this) { 50 weak_ptr_factory_(this) {
49 } 51 }
50 52
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 bool success) { 399 bool success) {
398 if (!success) { 400 if (!success) {
399 error_callback.Run(); 401 error_callback.Run();
400 return; 402 return;
401 } 403 }
402 404
403 ScopedVector<BluetoothServiceRecord> records; 405 ScopedVector<BluetoothServiceRecord> records;
404 for (BluetoothDeviceClient::ServiceMap::const_iterator i = 406 for (BluetoothDeviceClient::ServiceMap::const_iterator i =
405 service_map.begin(); i != service_map.end(); ++i) { 407 service_map.begin(); i != service_map.end(); ++i) {
406 records.push_back( 408 records.push_back(
407 new BluetoothServiceRecord(address(), i->second)); 409 new BluetoothServiceRecordChromeOs(address(), i->second));
408 } 410 }
409 callback.Run(records); 411 callback.Run(records);
410 } 412 }
411 413
412 void BluetoothDeviceChromeOs::OnSetTrusted(const base::Closure& callback, 414 void BluetoothDeviceChromeOs::OnSetTrusted(const base::Closure& callback,
413 const ErrorCallback& error_callback, 415 const ErrorCallback& error_callback,
414 bool success) { 416 bool success) {
415 if (success) { 417 if (success) {
416 callback.Run(); 418 callback.Run();
417 } else { 419 } else {
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 } 721 }
720 722
721 723
722 // static 724 // static
723 BluetoothDeviceChromeOs* BluetoothDeviceChromeOs::Create( 725 BluetoothDeviceChromeOs* BluetoothDeviceChromeOs::Create(
724 BluetoothAdapterChromeOs* adapter) { 726 BluetoothAdapterChromeOs* adapter) {
725 return new BluetoothDeviceChromeOs(adapter); 727 return new BluetoothDeviceChromeOs(adapter);
726 } 728 }
727 729
728 } // namespace chromeos 730 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_service_record.h » ('j') | device/bluetooth/bluetooth_service_record.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698