OLD | NEW |
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 "chromeos/dbus/bluetooth_agent_service_provider.h" | 5 #include "chromeos/dbus/bluetooth_agent_service_provider.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/chromeos/chromeos_version.h" | 10 #include "base/chromeos/chromeos_version.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 class BluetoothAgentServiceProviderImpl : public BluetoothAgentServiceProvider { | 32 class BluetoothAgentServiceProviderImpl : public BluetoothAgentServiceProvider { |
33 public: | 33 public: |
34 BluetoothAgentServiceProviderImpl(dbus::Bus* bus, | 34 BluetoothAgentServiceProviderImpl(dbus::Bus* bus, |
35 const dbus::ObjectPath& object_path, | 35 const dbus::ObjectPath& object_path, |
36 Delegate* delegate) | 36 Delegate* delegate) |
37 : origin_thread_id_(base::PlatformThread::CurrentId()), | 37 : origin_thread_id_(base::PlatformThread::CurrentId()), |
38 bus_(bus), | 38 bus_(bus), |
39 delegate_(delegate), | 39 delegate_(delegate), |
40 object_path_(object_path), | 40 object_path_(object_path), |
41 weak_ptr_factory_(this) { | 41 weak_ptr_factory_(this) { |
42 DVLOG(1) << "Creating BluetoothAdapterClientImpl for " | 42 VLOG(1) << "Creating BluetoothAdapterClientImpl for " |
43 << object_path.value(); | 43 << object_path.value(); |
44 | 44 |
45 exported_object_ = bus_->GetExportedObject(object_path_); | 45 exported_object_ = bus_->GetExportedObject(object_path_); |
46 | 46 |
47 exported_object_->ExportMethod( | 47 exported_object_->ExportMethod( |
48 bluetooth_agent::kBluetoothAgentInterface, | 48 bluetooth_agent::kBluetoothAgentInterface, |
49 bluetooth_agent::kRelease, | 49 bluetooth_agent::kRelease, |
50 base::Bind(&BluetoothAgentServiceProviderImpl::Release, | 50 base::Bind(&BluetoothAgentServiceProviderImpl::Release, |
51 weak_ptr_factory_.GetWeakPtr()), | 51 weak_ptr_factory_.GetWeakPtr()), |
52 base::Bind(&BluetoothAgentServiceProviderImpl::ReleaseExported, | 52 base::Bind(&BluetoothAgentServiceProviderImpl::ReleaseExported, |
53 weak_ptr_factory_.GetWeakPtr())); | 53 weak_ptr_factory_.GetWeakPtr())); |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 const dbus::ObjectPath& object_path, | 564 const dbus::ObjectPath& object_path, |
565 Delegate* delegate) { | 565 Delegate* delegate) { |
566 if (base::chromeos::IsRunningOnChromeOS()) { | 566 if (base::chromeos::IsRunningOnChromeOS()) { |
567 return new BluetoothAgentServiceProviderImpl(bus, object_path, delegate); | 567 return new BluetoothAgentServiceProviderImpl(bus, object_path, delegate); |
568 } else { | 568 } else { |
569 return new BluetoothAgentServiceProviderStubImpl(delegate); | 569 return new BluetoothAgentServiceProviderStubImpl(delegate); |
570 } | 570 } |
571 } | 571 } |
572 | 572 |
573 } // namespace chromeos | 573 } // namespace chromeos |
OLD | NEW |