| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_media_transport_client.h" | 5 #include "chromeos/dbus/fake_bluetooth_media_transport_client.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "chromeos/dbus/bluetooth_media_client.h" | 8 #include "chromeos/dbus/bluetooth_media_client.h" |
| 9 #include "chromeos/dbus/dbus_thread_manager.h" | 9 #include "chromeos/dbus/dbus_thread_manager.h" |
| 10 #include "chromeos/dbus/fake_bluetooth_media_client.h" | 10 #include "chromeos/dbus/fake_bluetooth_media_client.h" |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 error_callback.Run(kNotImplemented, ""); | 129 error_callback.Run(kNotImplemented, ""); |
| 130 } | 130 } |
| 131 | 131 |
| 132 void FakeBluetoothMediaTransportClient::SetValid( | 132 void FakeBluetoothMediaTransportClient::SetValid( |
| 133 const ObjectPath& endpoint_path, | 133 const ObjectPath& endpoint_path, |
| 134 bool valid) { | 134 bool valid) { |
| 135 if (valid) { | 135 if (valid) { |
| 136 endpoints_[endpoint_path] = valid; | 136 endpoints_[endpoint_path] = valid; |
| 137 return; | 137 return; |
| 138 } | 138 } |
| 139 |
| 139 endpoints_.erase(endpoint_path); | 140 endpoints_.erase(endpoint_path); |
| 140 | 141 |
| 141 // TODO(mcchou): Since there is only one transport path, all observers will | 142 // TODO(mcchou): Since there is only one transport path, all observers will |
| 142 // be notified. Shades irrelevant observers. | 143 // be notified. Shades irrelevant observers. |
| 143 | 144 |
| 144 // Notifies observers about the state change of the transport. | 145 // Notifies observers about the state change of the transport. |
| 145 FOR_EACH_OBSERVER(BluetoothMediaTransportClient::Observer, observers_, | 146 FOR_EACH_OBSERVER(BluetoothMediaTransportClient::Observer, observers_, |
| 146 MediaTransportRemoved(object_path_)); | 147 MediaTransportRemoved(object_path_)); |
| 147 } | 148 } |
| 148 | 149 |
| 149 void FakeBluetoothMediaTransportClient::OnPropertyChanged( | 150 void FakeBluetoothMediaTransportClient::OnPropertyChanged( |
| 150 const std::string& property_name) { | 151 const std::string& property_name) { |
| 151 VLOG(1) << "Property " << property_name << " changed"; | 152 VLOG(1) << "Property " << property_name << " changed"; |
| 152 } | 153 } |
| 153 | 154 |
| 154 } // namespace chromeos | 155 } // namespace chromeos |
| OLD | NEW |