Upstreaming browser/ui/uikit_ui_util from iOS.
[chromium-blink-merge.git] / content / renderer / media / content_media_service_provider.h
blob0f34953abc0f24782fa5daf787f5a8d573e82e98
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 #ifndef CONTENT_RENDERER_MEDIA_CONTENT_MEDIA_SERVICE_PROVIDER_H_
6 #define CONTENT_RENDERER_MEDIA_CONTENT_MEDIA_SERVICE_PROVIDER_H_
8 #include "base/macros.h"
9 #include "content/common/content_export.h"
10 #include "content/public/renderer/render_frame_observer.h"
11 #include "media/mojo/services/media_service_provider.h"
13 namespace content {
15 class ServiceRegistry;
17 // content::ServiceRegistry based media::MediaServiceProvider implementation.
18 class CONTENT_EXPORT ContentMediaServiceProvider
19 : public media::MediaServiceProvider,
20 public RenderFrameObserver {
21 public:
22 ContentMediaServiceProvider(RenderFrame* render_frame,
23 ServiceRegistry* service_registry);
24 ~ContentMediaServiceProvider() final;
26 void ConnectToService(
27 mojo::InterfacePtr<mojo::MediaRenderer>* media_renderer_ptr) final;
29 void ConnectToService(
30 mojo::InterfacePtr<mojo::ContentDecryptionModule>* cdm_ptr) final;
32 private:
33 ServiceRegistry* service_registry_;
35 DISALLOW_COPY_AND_ASSIGN(ContentMediaServiceProvider);
38 } // namespace content
40 #endif // CONTENT_RENDERER_MEDIA_CONTENT_MEDIA_SERVICE_PROVIDER_H_