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
3 // found in the LICENSE file.
5 #include "content/renderer/media/content_media_service_provider.h"
7 #include "content/public/common/service_registry.h"
11 ContentMediaServiceProvider::ContentMediaServiceProvider(
12 RenderFrame
* render_frame
,
13 ServiceRegistry
* service_registry
)
14 : RenderFrameObserver(render_frame
), service_registry_(service_registry
) {
15 DCHECK(service_registry_
);
18 ContentMediaServiceProvider::~ContentMediaServiceProvider() {
21 void ContentMediaServiceProvider::ConnectToService(
22 mojo::InterfacePtr
<mojo::MediaRenderer
>* media_renderer_ptr
) {
23 service_registry_
->ConnectToRemoteService(mojo::GetProxy(media_renderer_ptr
));
26 void ContentMediaServiceProvider::ConnectToService(
27 mojo::InterfacePtr
<mojo::ContentDecryptionModule
>* cdm_ptr
) {
28 service_registry_
->ConnectToRemoteService(mojo::GetProxy(cdm_ptr
));
31 } // namespace content