| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/fake_bluetooth_agent_manager_client.h" | 5 #include "device/bluetooth/dbus/fake_bluetooth_agent_manager_client.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chromeos/dbus/fake_bluetooth_agent_service_provider.h" | 8 #include "device/bluetooth/dbus/fake_bluetooth_agent_service_provider.h" |
| 9 #include "third_party/cros_system_api/dbus/service_constants.h" | 9 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 10 | 10 |
| 11 namespace chromeos { | 11 namespace bluez { |
| 12 | 12 |
| 13 FakeBluetoothAgentManagerClient::FakeBluetoothAgentManagerClient() | 13 FakeBluetoothAgentManagerClient::FakeBluetoothAgentManagerClient() |
| 14 : service_provider_(NULL) { | 14 : service_provider_(NULL) {} |
| 15 } | |
| 16 | 15 |
| 17 FakeBluetoothAgentManagerClient::~FakeBluetoothAgentManagerClient() { | 16 FakeBluetoothAgentManagerClient::~FakeBluetoothAgentManagerClient() {} |
| 18 } | |
| 19 | 17 |
| 20 void FakeBluetoothAgentManagerClient::Init(dbus::Bus* bus) { | 18 void FakeBluetoothAgentManagerClient::Init(dbus::Bus* bus) {} |
| 21 } | |
| 22 | 19 |
| 23 void FakeBluetoothAgentManagerClient::RegisterAgent( | 20 void FakeBluetoothAgentManagerClient::RegisterAgent( |
| 24 const dbus::ObjectPath& agent_path, | 21 const dbus::ObjectPath& agent_path, |
| 25 const std::string& capability, | 22 const std::string& capability, |
| 26 const base::Closure& callback, | 23 const base::Closure& callback, |
| 27 const ErrorCallback& error_callback) { | 24 const ErrorCallback& error_callback) { |
| 28 VLOG(1) << "RegisterAgent: " << agent_path.value(); | 25 VLOG(1) << "RegisterAgent: " << agent_path.value(); |
| 29 | 26 |
| 30 if (service_provider_ == NULL) { | 27 if (service_provider_ == NULL) { |
| 31 error_callback.Run(bluetooth_agent_manager::kErrorInvalidArguments, | 28 error_callback.Run(bluetooth_agent_manager::kErrorInvalidArguments, |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 FakeBluetoothAgentServiceProvider* service_provider) { | 68 FakeBluetoothAgentServiceProvider* service_provider) { |
| 72 if (service_provider_ == service_provider) | 69 if (service_provider_ == service_provider) |
| 73 service_provider_ = NULL; | 70 service_provider_ = NULL; |
| 74 } | 71 } |
| 75 | 72 |
| 76 FakeBluetoothAgentServiceProvider* | 73 FakeBluetoothAgentServiceProvider* |
| 77 FakeBluetoothAgentManagerClient::GetAgentServiceProvider() { | 74 FakeBluetoothAgentManagerClient::GetAgentServiceProvider() { |
| 78 return service_provider_; | 75 return service_provider_; |
| 79 } | 76 } |
| 80 | 77 |
| 81 } // namespace chromeos | 78 } // namespace bluez |
| OLD | NEW |