Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(464)

Unified Diff: content/browser/media/media_interface_proxy.cc

Issue 2847743003: Eliminate InterfaceRegistry (Closed)
Patch Set: . Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/media/media_interface_proxy.h ('k') | content/public/browser/content_browser_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/media_interface_proxy.cc
diff --git a/content/browser/media/media_interface_proxy.cc b/content/browser/media/media_interface_proxy.cc
index 0c9342db509387134c5afc0b1be726055c09c09a..a7b3be06a21dc3b02fd60e3dd05bd9535bb0a472 100644
--- a/content/browser/media/media_interface_proxy.cc
+++ b/content/browser/media/media_interface_proxy.cc
@@ -13,6 +13,7 @@
#include "content/public/common/content_client.h"
#include "content/public/common/service_manager_connection.h"
#include "media/mojo/interfaces/media_service.mojom.h"
+#include "media/mojo/services/media_interface_provider.h"
#include "services/service_manager/public/cpp/connector.h"
#if defined(ENABLE_MOJO_CDM)
@@ -98,29 +99,24 @@ void MediaInterfaceProxy::ConnectToService() {
DCHECK(!interface_factory_ptr_);
// Register frame services.
- auto registry =
- base::MakeUnique<service_manager::InterfaceRegistry>(std::string());
+ service_manager::mojom::InterfaceProviderPtr interfaces;
+ // TODO(xhwang): Replace this InterfaceProvider with a dedicated media host
+ // interface. See http://crbug.com/660573
+ auto provider = base::MakeUnique<media::MediaInterfaceProvider>(
+ mojo::MakeRequest(&interfaces));
#if defined(ENABLE_MOJO_CDM)
// TODO(slan): Wrap these into a RenderFrame specific ProvisionFetcher impl.
net::URLRequestContextGetter* context_getter =
BrowserContext::GetDefaultStoragePartition(
render_frame_host_->GetProcess()->GetBrowserContext())
->GetURLRequestContext();
- registry->AddInterface(
+ provider->registry()->AddInterface(
base::Bind(&ProvisionFetcherImpl::Create, context_getter));
#endif // defined(ENABLE_MOJO_CDM)
GetContentClient()->browser()->ExposeInterfacesToMediaService(
- registry.get(), render_frame_host_);
+ provider->registry(), render_frame_host_);
- // Get frame service InterfaceProvider.
- // TODO(xhwang): Replace this InterfaceProvider with a dedicated media host
- // interface. See http://crbug.com/660573
- service_manager::mojom::InterfaceProviderPtr interfaces;
- registry->Bind(MakeRequest(&interfaces), service_manager::Identity(),
- service_manager::InterfaceProviderSpec(),
- service_manager::Identity(),
- service_manager::InterfaceProviderSpec());
- media_registries_.push_back(std::move(registry));
+ media_registries_.push_back(std::move(provider));
// TODO(slan): Use the BrowserContext Connector instead. See crbug.com/638950.
media::mojom::MediaServicePtr media_service;
« no previous file with comments | « content/browser/media/media_interface_proxy.h ('k') | content/public/browser/content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698