OLD | NEW |
---|---|
(Empty) | |
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. | |
4 | |
5 #ifndef MOJO_SERVICES_HTML_VIEWER_WEBMEDIAPLAYER_FACTORY_H_ | |
6 #define MOJO_SERVICES_HTML_VIEWER_WEBMEDIAPLAYER_FACTORY_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "base/memory/ref_counted.h" | |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "base/threading/thread.h" | |
12 #include "media/audio/fake_audio_log_factory.h" | |
13 #include "media/base/audio_hardware_config.h" | |
14 | |
15 namespace base { | |
16 class SingleThreadTaskRunner; | |
17 } | |
18 | |
19 namespace blink { | |
20 class WebMediaPlayer; | |
21 class WebLocalFrame; | |
22 class WebURL; | |
23 class WebMediaPlayerClient; | |
24 } | |
25 | |
26 namespace media { | |
27 class AudioManager; | |
28 class AudioRendererSink; | |
29 } | |
30 | |
31 namespace mojo { | |
32 | |
33 // Helper class used to create blink::WebMediaPlayer objects. | |
34 // This class stores the "global state" shared across all WebMediaPlayer | |
35 // instances. | |
36 class WebMediaPlayerFactory { | |
37 public: | |
38 WebMediaPlayerFactory( | |
jamesr
2014/09/12 21:03:58
explicit
acolwell GONE FROM CHROMIUM
2014/09/12 21:43:40
Done.
| |
39 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner) | |
40 ; | |
jamesr
2014/09/12 21:03:58
woah this line wrapping is weird. is this what 'gi
acolwell GONE FROM CHROMIUM
2014/09/12 21:43:40
Nope. That was done manually. I just ran 'git cl f
| |
41 ~WebMediaPlayerFactory(); | |
42 | |
43 blink::WebMediaPlayer* CreateMediaPlayer( | |
44 blink::WebLocalFrame* frame, | |
45 const blink::WebURL& url, | |
46 blink::WebMediaPlayerClient* client); | |
47 | |
48 private: | |
49 const media::AudioHardwareConfig& GetAudioHardwareConfig(); | |
50 scoped_refptr<media::AudioRendererSink> CreateAudioRendererSink(); | |
51 scoped_refptr<base::SingleThreadTaskRunner> GetMediaThreadTaskRunner(); | |
52 | |
53 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_; | |
54 base::Thread media_thread_; | |
55 media::FakeAudioLogFactory fake_audio_log_factory_; | |
56 scoped_ptr<media::AudioManager> audio_manager_; | |
57 media::AudioHardwareConfig audio_hardware_config_; | |
58 | |
59 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerFactory); | |
60 }; | |
61 | |
62 } // namespace mojo | |
63 | |
64 #endif // MOJO_SERVICES_HTML_VIEWER_WEBMEDIAPLAYER_FACTORY_H_ | |
OLD | NEW |