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

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

Issue 1679573002: Move shell interfaces into the shell.mojom namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@delegate
Patch Set: . Created 4 years, 10 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
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"
(...skipping 24 matching lines...) Expand all
35 class AudioManager; 35 class AudioManager;
36 class RestartableAudioRendererSink; 36 class RestartableAudioRendererSink;
37 class CdmFactory; 37 class CdmFactory;
38 class MediaPermission; 38 class MediaPermission;
39 class UrlIndex; 39 class UrlIndex;
40 class WebEncryptedMediaClientImpl; 40 class WebEncryptedMediaClientImpl;
41 } 41 }
42 42
43 namespace mojo { 43 namespace mojo {
44 class ServiceProvider; 44 class ServiceProvider;
45 namespace shell {
46 namespace mojom {
45 class Shell; 47 class Shell;
46 } 48 }
49 }
50 }
47 51
48 namespace html_viewer { 52 namespace html_viewer {
49 53
50 // Helper class used to create blink::WebMediaPlayer objects. 54 // Helper class used to create blink::WebMediaPlayer objects.
51 // This class stores the "global state" shared across all WebMediaPlayer 55 // This class stores the "global state" shared across all WebMediaPlayer
52 // instances. 56 // instances.
53 class MediaFactory { 57 class MediaFactory {
54 public: 58 public:
55 MediaFactory( 59 MediaFactory(
56 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner, 60 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner,
57 mojo::Shell* shell); 61 mojo::shell::mojom::Shell* shell);
58 ~MediaFactory(); 62 ~MediaFactory();
59 63
60 blink::WebMediaPlayer* CreateMediaPlayer( 64 blink::WebMediaPlayer* CreateMediaPlayer(
61 blink::WebLocalFrame* frame, 65 blink::WebLocalFrame* frame,
62 const blink::WebURL& url, 66 const blink::WebURL& url,
63 blink::WebMediaPlayerClient* client, 67 blink::WebMediaPlayerClient* client,
64 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client, 68 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client,
65 blink::WebContentDecryptionModule* initial_cdm, 69 blink::WebContentDecryptionModule* initial_cdm,
66 mojo::Shell* shell); 70 mojo::shell::mojom::Shell* shell);
67 71
68 blink::WebEncryptedMediaClient* GetEncryptedMediaClient(); 72 blink::WebEncryptedMediaClient* GetEncryptedMediaClient();
69 73
70 private: 74 private:
71 media::interfaces::ServiceFactory* GetMediaServiceFactory(); 75 media::interfaces::ServiceFactory* GetMediaServiceFactory();
72 media::MediaPermission* GetMediaPermission(); 76 media::MediaPermission* GetMediaPermission();
73 media::CdmFactory* GetCdmFactory(); 77 media::CdmFactory* GetCdmFactory();
74 78
75 #if !defined(OS_ANDROID) 79 #if !defined(OS_ANDROID)
76 const media::AudioHardwareConfig& GetAudioHardwareConfig(); 80 const media::AudioHardwareConfig& GetAudioHardwareConfig();
77 scoped_refptr<media::RestartableAudioRendererSink> CreateAudioRendererSink(); 81 scoped_refptr<media::RestartableAudioRendererSink> CreateAudioRendererSink();
78 scoped_refptr<base::SingleThreadTaskRunner> GetMediaThreadTaskRunner(); 82 scoped_refptr<base::SingleThreadTaskRunner> GetMediaThreadTaskRunner();
79 83
80 base::Thread media_thread_; 84 base::Thread media_thread_;
81 media::FakeAudioLogFactory fake_audio_log_factory_; 85 media::FakeAudioLogFactory fake_audio_log_factory_;
82 scoped_ptr<media::AudioManager> audio_manager_; 86 scoped_ptr<media::AudioManager> audio_manager_;
83 media::AudioHardwareConfig audio_hardware_config_; 87 media::AudioHardwareConfig audio_hardware_config_;
84 #endif 88 #endif
85 89
86 const bool enable_mojo_media_renderer_; 90 const bool enable_mojo_media_renderer_;
87 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_; 91 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_;
88 mojo::Shell* shell_; 92 mojo::shell::mojom::Shell* shell_;
89 93
90 // Lazily initialized objects. 94 // Lazily initialized objects.
91 media::interfaces::ServiceFactoryPtr media_service_factory_; 95 media::interfaces::ServiceFactoryPtr media_service_factory_;
92 scoped_ptr<media::WebEncryptedMediaClientImpl> web_encrypted_media_client_; 96 scoped_ptr<media::WebEncryptedMediaClientImpl> web_encrypted_media_client_;
93 scoped_ptr<media::MediaPermission> media_permission_; 97 scoped_ptr<media::MediaPermission> media_permission_;
94 scoped_ptr<media::CdmFactory> cdm_factory_; 98 scoped_ptr<media::CdmFactory> cdm_factory_;
95 99
96 // Media resource cache, lazily initialized. 100 // Media resource cache, lazily initialized.
97 linked_ptr<media::UrlIndex> url_index_; 101 linked_ptr<media::UrlIndex> url_index_;
98 102
99 DISALLOW_COPY_AND_ASSIGN(MediaFactory); 103 DISALLOW_COPY_AND_ASSIGN(MediaFactory);
100 }; 104 };
101 105
102 } // namespace html_viewer 106 } // namespace html_viewer
103 107
104 #endif // COMPONENTS_HTML_VIEWER_MEDIA_FACTORY_H_ 108 #endif // COMPONENTS_HTML_VIEWER_MEDIA_FACTORY_H_
OLDNEW
« no previous file with comments | « components/html_viewer/layout_test_html_viewer.cc ('k') | components/html_viewer/media_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698