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 #ifndef COMPONENTS_HTML_VIEWER_MEDIA_FACTORY_H_ | 5 #ifndef COMPONENTS_HTML_VIEWER_MEDIA_FACTORY_H_ |
6 #define COMPONENTS_HTML_VIEWER_MEDIA_FACTORY_H_ | 6 #define COMPONENTS_HTML_VIEWER_MEDIA_FACTORY_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/linked_ptr.h" | 9 #include "base/memory/linked_ptr.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/threading/thread.h" | 12 #include "base/threading/thread.h" |
13 #include "media/audio/fake_audio_log_factory.h" | 13 #include "media/audio/fake_audio_log_factory.h" |
14 #include "media/base/audio_hardware_config.h" | 14 #include "media/base/audio_hardware_config.h" |
15 #include "media/blink/url_index.h" | 15 #include "media/blink/url_index.h" |
16 #include "media/mojo/interfaces/service_factory.mojom.h" | |
17 #include "mojo/application/public/interfaces/service_provider.mojom.h" | 16 #include "mojo/application/public/interfaces/service_provider.mojom.h" |
18 | 17 |
19 namespace base { | 18 namespace base { |
20 class SingleThreadTaskRunner; | 19 class SingleThreadTaskRunner; |
21 } | 20 } |
22 | 21 |
23 namespace blink { | 22 namespace blink { |
24 class WebContentDecryptionModule; | 23 class WebContentDecryptionModule; |
25 class WebEncryptedMediaClient; | 24 class WebEncryptedMediaClient; |
26 class WebMediaPlayer; | 25 class WebMediaPlayer; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 blink::WebLocalFrame* frame, | 59 blink::WebLocalFrame* frame, |
61 const blink::WebURL& url, | 60 const blink::WebURL& url, |
62 blink::WebMediaPlayerClient* client, | 61 blink::WebMediaPlayerClient* client, |
63 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client, | 62 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client, |
64 blink::WebContentDecryptionModule* initial_cdm, | 63 blink::WebContentDecryptionModule* initial_cdm, |
65 mojo::Shell* shell); | 64 mojo::Shell* shell); |
66 | 65 |
67 blink::WebEncryptedMediaClient* GetEncryptedMediaClient(); | 66 blink::WebEncryptedMediaClient* GetEncryptedMediaClient(); |
68 | 67 |
69 private: | 68 private: |
70 media::interfaces::ServiceFactory* GetMediaServiceFactory(); | 69 mojo::ServiceProvider* GetMediaServiceProvider(); |
71 media::MediaPermission* GetMediaPermission(); | 70 media::MediaPermission* GetMediaPermission(); |
72 media::CdmFactory* GetCdmFactory(); | 71 media::CdmFactory* GetCdmFactory(); |
73 | 72 |
74 #if !defined(OS_ANDROID) | 73 #if !defined(OS_ANDROID) |
75 const media::AudioHardwareConfig& GetAudioHardwareConfig(); | 74 const media::AudioHardwareConfig& GetAudioHardwareConfig(); |
76 scoped_refptr<media::RestartableAudioRendererSink> CreateAudioRendererSink(); | 75 scoped_refptr<media::RestartableAudioRendererSink> CreateAudioRendererSink(); |
77 scoped_refptr<base::SingleThreadTaskRunner> GetMediaThreadTaskRunner(); | 76 scoped_refptr<base::SingleThreadTaskRunner> GetMediaThreadTaskRunner(); |
78 | 77 |
79 base::Thread media_thread_; | 78 base::Thread media_thread_; |
80 media::FakeAudioLogFactory fake_audio_log_factory_; | 79 media::FakeAudioLogFactory fake_audio_log_factory_; |
81 scoped_ptr<media::AudioManager> audio_manager_; | 80 scoped_ptr<media::AudioManager> audio_manager_; |
82 media::AudioHardwareConfig audio_hardware_config_; | 81 media::AudioHardwareConfig audio_hardware_config_; |
83 #endif | 82 #endif |
84 | 83 |
85 const bool enable_mojo_media_renderer_; | 84 const bool enable_mojo_media_renderer_; |
86 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_; | 85 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_; |
87 mojo::Shell* shell_; | 86 mojo::Shell* shell_; |
88 | 87 |
89 // Lazily initialized objects. | 88 // Lazily initialized objects. |
90 media::interfaces::ServiceFactoryPtr media_service_factory_; | 89 mojo::ServiceProviderPtr media_service_provider_; |
91 scoped_ptr<media::WebEncryptedMediaClientImpl> web_encrypted_media_client_; | 90 scoped_ptr<media::WebEncryptedMediaClientImpl> web_encrypted_media_client_; |
92 scoped_ptr<media::MediaPermission> media_permission_; | 91 scoped_ptr<media::MediaPermission> media_permission_; |
93 scoped_ptr<media::CdmFactory> cdm_factory_; | 92 scoped_ptr<media::CdmFactory> cdm_factory_; |
94 | 93 |
95 // Media resource cache, lazily initialized. | 94 // Media resource cache, lazily initialized. |
96 linked_ptr<media::UrlIndex> url_index_; | 95 linked_ptr<media::UrlIndex> url_index_; |
97 | 96 |
98 DISALLOW_COPY_AND_ASSIGN(MediaFactory); | 97 DISALLOW_COPY_AND_ASSIGN(MediaFactory); |
99 }; | 98 }; |
100 | 99 |
101 } // namespace html_viewer | 100 } // namespace html_viewer |
102 | 101 |
103 #endif // COMPONENTS_HTML_VIEWER_MEDIA_FACTORY_H_ | 102 #endif // COMPONENTS_HTML_VIEWER_MEDIA_FACTORY_H_ |
OLD | NEW |