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

Side by Side Diff: components/html_viewer/media_factory.h

Issue 1230313010: media: Add ServiceFactory mojo interface and implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase only Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | components/html_viewer/media_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/threading/thread.h" 11 #include "base/threading/thread.h"
12 #include "media/audio/fake_audio_log_factory.h" 12 #include "media/audio/fake_audio_log_factory.h"
13 #include "media/base/audio_hardware_config.h" 13 #include "media/base/audio_hardware_config.h"
14 #include "media/mojo/interfaces/service_factory.mojom.h"
14 #include "mojo/application/public/interfaces/service_provider.mojom.h" 15 #include "mojo/application/public/interfaces/service_provider.mojom.h"
15 16
16 namespace base { 17 namespace base {
17 class SingleThreadTaskRunner; 18 class SingleThreadTaskRunner;
18 } 19 }
19 20
20 namespace blink { 21 namespace blink {
21 class WebContentDecryptionModule; 22 class WebContentDecryptionModule;
22 class WebEncryptedMediaClient; 23 class WebEncryptedMediaClient;
23 class WebMediaPlayer; 24 class WebMediaPlayer;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 blink::WebLocalFrame* frame, 57 blink::WebLocalFrame* frame,
57 const blink::WebURL& url, 58 const blink::WebURL& url,
58 blink::WebMediaPlayerClient* client, 59 blink::WebMediaPlayerClient* client,
59 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client, 60 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client,
60 blink::WebContentDecryptionModule* initial_cdm, 61 blink::WebContentDecryptionModule* initial_cdm,
61 mojo::Shell* shell); 62 mojo::Shell* shell);
62 63
63 blink::WebEncryptedMediaClient* GetEncryptedMediaClient(); 64 blink::WebEncryptedMediaClient* GetEncryptedMediaClient();
64 65
65 private: 66 private:
66 mojo::ServiceProvider* GetMediaServiceProvider(); 67 media::interfaces::ServiceFactory* GetMediaServiceFactory();
67 media::MediaPermission* GetMediaPermission(); 68 media::MediaPermission* GetMediaPermission();
68 media::CdmFactory* GetCdmFactory(); 69 media::CdmFactory* GetCdmFactory();
69 70
70 #if !defined(OS_ANDROID) 71 #if !defined(OS_ANDROID)
71 const media::AudioHardwareConfig& GetAudioHardwareConfig(); 72 const media::AudioHardwareConfig& GetAudioHardwareConfig();
72 scoped_refptr<media::AudioRendererSink> CreateAudioRendererSink(); 73 scoped_refptr<media::AudioRendererSink> CreateAudioRendererSink();
73 scoped_refptr<base::SingleThreadTaskRunner> GetMediaThreadTaskRunner(); 74 scoped_refptr<base::SingleThreadTaskRunner> GetMediaThreadTaskRunner();
74 75
75 base::Thread media_thread_; 76 base::Thread media_thread_;
76 media::FakeAudioLogFactory fake_audio_log_factory_; 77 media::FakeAudioLogFactory fake_audio_log_factory_;
77 scoped_ptr<media::AudioManager> audio_manager_; 78 scoped_ptr<media::AudioManager> audio_manager_;
78 media::AudioHardwareConfig audio_hardware_config_; 79 media::AudioHardwareConfig audio_hardware_config_;
79 #endif 80 #endif
80 81
81 const bool enable_mojo_media_renderer_; 82 const bool enable_mojo_media_renderer_;
82 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_; 83 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_;
83 mojo::Shell* shell_; 84 mojo::Shell* shell_;
84 85
85 // Lazily initialized objects. 86 // Lazily initialized objects.
86 mojo::ServiceProviderPtr media_service_provider_; 87 media::interfaces::ServiceFactoryPtr media_service_factory_;
87 scoped_ptr<media::WebEncryptedMediaClientImpl> web_encrypted_media_client_; 88 scoped_ptr<media::WebEncryptedMediaClientImpl> web_encrypted_media_client_;
88 scoped_ptr<media::MediaPermission> media_permission_; 89 scoped_ptr<media::MediaPermission> media_permission_;
89 scoped_ptr<media::CdmFactory> cdm_factory_; 90 scoped_ptr<media::CdmFactory> cdm_factory_;
90 91
91 DISALLOW_COPY_AND_ASSIGN(MediaFactory); 92 DISALLOW_COPY_AND_ASSIGN(MediaFactory);
92 }; 93 };
93 94
94 } // namespace html_viewer 95 } // namespace html_viewer
95 96
96 #endif // COMPONENTS_HTML_VIEWER_MEDIA_FACTORY_H_ 97 #endif // COMPONENTS_HTML_VIEWER_MEDIA_FACTORY_H_
OLDNEW
« no previous file with comments | « no previous file | components/html_viewer/media_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698