| 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_profile_service_provider.h" | 5 #include "chromeos/dbus/fake_bluetooth_profile_service_provider.h" |
| 6 | 6 |
| 7 #include "chromeos/dbus/dbus_thread_manager.h" | 7 #include "chromeos/dbus/dbus_thread_manager.h" |
| 8 #include "chromeos/dbus/fake_bluetooth_profile_manager_client.h" | 8 #include "chromeos/dbus/fake_bluetooth_profile_manager_client.h" |
| 9 | 9 |
| 10 namespace chromeos { | 10 namespace chromeos { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 FakeBluetoothProfileServiceProvider::~FakeBluetoothProfileServiceProvider() { | 25 FakeBluetoothProfileServiceProvider::~FakeBluetoothProfileServiceProvider() { |
| 26 VLOG(1) << "Cleaning up Bluetooth Profile: " << object_path_.value(); | 26 VLOG(1) << "Cleaning up Bluetooth Profile: " << object_path_.value(); |
| 27 | 27 |
| 28 FakeBluetoothProfileManagerClient* fake_bluetooth_profile_manager_client = | 28 FakeBluetoothProfileManagerClient* fake_bluetooth_profile_manager_client = |
| 29 static_cast<FakeBluetoothProfileManagerClient*>( | 29 static_cast<FakeBluetoothProfileManagerClient*>( |
| 30 DBusThreadManager::Get()->GetBluetoothProfileManagerClient()); | 30 DBusThreadManager::Get()->GetBluetoothProfileManagerClient()); |
| 31 fake_bluetooth_profile_manager_client->UnregisterProfileServiceProvider(this); | 31 fake_bluetooth_profile_manager_client->UnregisterProfileServiceProvider(this); |
| 32 } | 32 } |
| 33 | 33 |
| 34 void FakeBluetoothProfileServiceProvider::Release() { | 34 void FakeBluetoothProfileServiceProvider::Released() { |
| 35 VLOG(1) << object_path_.value() << ": Release"; | 35 VLOG(1) << object_path_.value() << ": Released"; |
| 36 delegate_->Released(); | 36 delegate_->Released(); |
| 37 } | 37 } |
| 38 | 38 |
| 39 void FakeBluetoothProfileServiceProvider::NewConnection( | 39 void FakeBluetoothProfileServiceProvider::NewConnection( |
| 40 const dbus::ObjectPath& device_path, | 40 const dbus::ObjectPath& device_path, |
| 41 scoped_ptr<dbus::FileDescriptor> fd, | 41 scoped_ptr<dbus::FileDescriptor> fd, |
| 42 const Delegate::Options& options, | 42 const Delegate::Options& options, |
| 43 const Delegate::ConfirmationCallback& callback) { | 43 const Delegate::ConfirmationCallback& callback) { |
| 44 VLOG(1) << object_path_.value() << ": NewConnection for " | 44 VLOG(1) << object_path_.value() << ": NewConnection for " |
| 45 << device_path.value(); | 45 << device_path.value(); |
| 46 delegate_->NewConnection(device_path, fd.Pass(), options, callback); | 46 delegate_->NewConnection(device_path, fd.Pass(), options, callback); |
| 47 } | 47 } |
| 48 | 48 |
| 49 void FakeBluetoothProfileServiceProvider::RequestDisconnection( | 49 void FakeBluetoothProfileServiceProvider::RequestDisconnection( |
| 50 const dbus::ObjectPath& device_path, | 50 const dbus::ObjectPath& device_path, |
| 51 const Delegate::ConfirmationCallback& callback) { | 51 const Delegate::ConfirmationCallback& callback) { |
| 52 VLOG(1) << object_path_.value() << ": RequestDisconnection for " | 52 VLOG(1) << object_path_.value() << ": RequestDisconnection for " |
| 53 << device_path.value(); | 53 << device_path.value(); |
| 54 delegate_->RequestDisconnection(device_path, callback); | 54 delegate_->RequestDisconnection(device_path, callback); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void FakeBluetoothProfileServiceProvider::Cancel() { | 57 void FakeBluetoothProfileServiceProvider::Cancel() { |
| 58 VLOG(1) << object_path_.value() << ": Cancel"; | 58 VLOG(1) << object_path_.value() << ": Cancel"; |
| 59 delegate_->Cancel(); | 59 delegate_->Cancel(); |
| 60 } | 60 } |
| 61 | 61 |
| 62 } // namespace chromeos | 62 } // namespace chromeos |
| OLD | NEW |