| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "content/browser/media/media_interface_proxy.h" | 5 #include "content/browser/media/media_interface_proxy.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 registry->Bind(MakeRequest(&interfaces), service_manager::Identity(), | 119 registry->Bind(MakeRequest(&interfaces), service_manager::Identity(), |
| 120 service_manager::InterfaceProviderSpec(), | 120 service_manager::InterfaceProviderSpec(), |
| 121 service_manager::Identity(), | 121 service_manager::Identity(), |
| 122 service_manager::InterfaceProviderSpec()); | 122 service_manager::InterfaceProviderSpec()); |
| 123 media_registries_.push_back(std::move(registry)); | 123 media_registries_.push_back(std::move(registry)); |
| 124 | 124 |
| 125 // TODO(slan): Use the BrowserContext Connector instead. See crbug.com/638950. | 125 // TODO(slan): Use the BrowserContext Connector instead. See crbug.com/638950. |
| 126 media::mojom::MediaServicePtr media_service; | 126 media::mojom::MediaServicePtr media_service; |
| 127 service_manager::Connector* connector = | 127 service_manager::Connector* connector = |
| 128 ServiceManagerConnection::GetForProcess()->GetConnector(); | 128 ServiceManagerConnection::GetForProcess()->GetConnector(); |
| 129 connector->ConnectToInterface("media", &media_service); | 129 connector->BindInterface("media", &media_service); |
| 130 media_service->CreateInterfaceFactory(MakeRequest(&interface_factory_ptr_), | 130 media_service->CreateInterfaceFactory(MakeRequest(&interface_factory_ptr_), |
| 131 std::move(interfaces)); | 131 std::move(interfaces)); |
| 132 interface_factory_ptr_.set_connection_error_handler(base::Bind( | 132 interface_factory_ptr_.set_connection_error_handler(base::Bind( |
| 133 &MediaInterfaceProxy::OnConnectionError, base::Unretained(this))); | 133 &MediaInterfaceProxy::OnConnectionError, base::Unretained(this))); |
| 134 } | 134 } |
| 135 | 135 |
| 136 } // namespace content | 136 } // namespace content |
| OLD | NEW |