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 "chromeos/dbus/bluetooth_agent_service_provider.h" | 5 #include "chromeos/dbus/bluetooth_agent_service_provider.h" |
6 | 6 |
7 #include <string> | |
8 | 7 |
9 #include "base/bind.h" | 8 #include "base/bind.h" |
10 #include "base/logging.h" | 9 #include "base/logging.h" |
11 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
12 #include "base/threading/platform_thread.h" | 11 #include "base/threading/platform_thread.h" |
13 #include "chromeos/dbus/dbus_thread_manager.h" | 12 #include "chromeos/dbus/dbus_thread_manager.h" |
14 #include "chromeos/dbus/fake_bluetooth_agent_service_provider.h" | 13 #include "chromeos/dbus/fake_bluetooth_agent_service_provider.h" |
15 #include "dbus/bus.h" | |
16 #include "dbus/exported_object.h" | 14 #include "dbus/exported_object.h" |
17 #include "dbus/message.h" | 15 #include "dbus/message.h" |
18 #include "dbus/object_path.h" | |
19 #include "third_party/cros_system_api/dbus/service_constants.h" | 16 #include "third_party/cros_system_api/dbus/service_constants.h" |
20 | 17 |
21 namespace chromeos { | 18 namespace chromeos { |
22 | 19 |
23 // The BluetoothAgentServiceProvider implementation used in production. | 20 // The BluetoothAgentServiceProvider implementation used in production. |
24 class BluetoothAgentServiceProviderImpl | 21 class BluetoothAgentServiceProviderImpl |
25 : public BluetoothAgentServiceProvider { | 22 : public BluetoothAgentServiceProvider { |
26 public: | 23 public: |
27 BluetoothAgentServiceProviderImpl(dbus::Bus* bus, | 24 BluetoothAgentServiceProviderImpl(dbus::Bus* bus, |
28 const dbus::ObjectPath& object_path, | 25 const dbus::ObjectPath& object_path, |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 const dbus::ObjectPath& object_path, | 455 const dbus::ObjectPath& object_path, |
459 Delegate* delegate) { | 456 Delegate* delegate) { |
460 if (!DBusThreadManager::Get()->IsUsingStub(DBusClientBundle::BLUETOOTH)) { | 457 if (!DBusThreadManager::Get()->IsUsingStub(DBusClientBundle::BLUETOOTH)) { |
461 return new BluetoothAgentServiceProviderImpl(bus, object_path, delegate); | 458 return new BluetoothAgentServiceProviderImpl(bus, object_path, delegate); |
462 } else { | 459 } else { |
463 return new FakeBluetoothAgentServiceProvider(object_path, delegate); | 460 return new FakeBluetoothAgentServiceProvider(object_path, delegate); |
464 } | 461 } |
465 } | 462 } |
466 | 463 |
467 } // namespace chromeos | 464 } // namespace chromeos |
OLD | NEW |