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

Side by Side Diff: mojo/services/html_viewer/web_media_player_factory.h

Issue 1099303002: Move html_viewer from mojo/services to components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 8 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
OLDNEW
(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_WEB_MEDIA_PLAYER_FACTORY_H_
6 #define MOJO_SERVICES_HTML_VIEWER_WEB_MEDIA_PLAYER_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 WebContentDecryptionModule;
21 class WebMediaPlayer;
22 class WebLocalFrame;
23 class WebURL;
24 class WebMediaPlayerClient;
25 }
26
27 namespace media {
28 class AudioManager;
29 class AudioRendererSink;
30 class CdmFactory;
31 class MediaPermission;
32 }
33
34 namespace mojo {
35 class Shell;
36 }
37
38 namespace html_viewer {
39
40 // Helper class used to create blink::WebMediaPlayer objects.
41 // This class stores the "global state" shared across all WebMediaPlayer
42 // instances.
43 class WebMediaPlayerFactory {
44 public:
45 explicit WebMediaPlayerFactory(const scoped_refptr<
46 base::SingleThreadTaskRunner>& compositor_task_runner,
47 bool enable_mojo_media_renderer);
48 ~WebMediaPlayerFactory();
49
50 blink::WebMediaPlayer* CreateMediaPlayer(
51 blink::WebLocalFrame* frame,
52 const blink::WebURL& url,
53 blink::WebMediaPlayerClient* client,
54 media::MediaPermission* media_permission,
55 media::CdmFactory* cdm_factory,
56 blink::WebContentDecryptionModule* initial_cdm,
57 mojo::Shell* shell);
58
59 private:
60 const media::AudioHardwareConfig& GetAudioHardwareConfig();
61 scoped_refptr<media::AudioRendererSink> CreateAudioRendererSink();
62 scoped_refptr<base::SingleThreadTaskRunner> GetMediaThreadTaskRunner();
63
64 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_;
65 const bool enable_mojo_media_renderer_;
66 base::Thread media_thread_;
67 media::FakeAudioLogFactory fake_audio_log_factory_;
68 scoped_ptr<media::AudioManager> audio_manager_;
69 media::AudioHardwareConfig audio_hardware_config_;
70
71 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerFactory);
72 };
73
74 } // namespace html_viewer
75
76 #endif // MOJO_SERVICES_HTML_VIEWER_WEB_MEDIA_PLAYER_FACTORY_H_
OLDNEW
« no previous file with comments | « mojo/services/html_viewer/web_layer_tree_view_impl.cc ('k') | mojo/services/html_viewer/web_media_player_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698