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

Side by Side Diff: media/blink/webmediaplayer_impl.h

Issue 1133033003: Eliminate MediaPlayer & MediaPlayerClient abstractions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed review comments 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 | « media/blink/encrypted_media_player_support.cc ('k') | media/blink/webmediaplayer_impl.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 5 #ifndef MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
6 #define MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 6 #define MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 11 matching lines...) Expand all
22 #include "media/blink/buffered_data_source.h" 22 #include "media/blink/buffered_data_source.h"
23 #include "media/blink/buffered_data_source_host_impl.h" 23 #include "media/blink/buffered_data_source_host_impl.h"
24 #include "media/blink/encrypted_media_player_support.h" 24 #include "media/blink/encrypted_media_player_support.h"
25 #include "media/blink/skcanvas_video_renderer.h" 25 #include "media/blink/skcanvas_video_renderer.h"
26 #include "media/blink/video_frame_compositor.h" 26 #include "media/blink/video_frame_compositor.h"
27 #include "media/blink/webmediaplayer_params.h" 27 #include "media/blink/webmediaplayer_params.h"
28 #include "media/blink/webmediaplayer_util.h" 28 #include "media/blink/webmediaplayer_util.h"
29 #include "third_party/WebKit/public/platform/WebAudioSourceProvider.h" 29 #include "third_party/WebKit/public/platform/WebAudioSourceProvider.h"
30 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h" 30 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h"
31 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" 31 #include "third_party/WebKit/public/platform/WebMediaPlayer.h"
32 #include "third_party/WebKit/public/platform/WebMediaPlayerClient.h"
33 #include "url/gurl.h" 32 #include "url/gurl.h"
34 33
35 namespace blink { 34 namespace blink {
36 class WebGraphicsContext3D; 35 class WebGraphicsContext3D;
37 class WebLocalFrame; 36 class WebLocalFrame;
37 class WebMediaPlayerClient;
38 class WebMediaPlayerEncryptedMediaClient;
38 } 39 }
39 40
40 namespace base { 41 namespace base {
41 class SingleThreadTaskRunner; 42 class SingleThreadTaskRunner;
42 } 43 }
43 44
44 namespace cc_blink { 45 namespace cc_blink {
45 class WebLayerImpl; 46 class WebLayerImpl;
46 } 47 }
47 48
(...skipping 13 matching lines...) Expand all
61 // Encrypted Media. 62 // Encrypted Media.
62 class MEDIA_EXPORT WebMediaPlayerImpl 63 class MEDIA_EXPORT WebMediaPlayerImpl
63 : public NON_EXPORTED_BASE(blink::WebMediaPlayer), 64 : public NON_EXPORTED_BASE(blink::WebMediaPlayer),
64 public base::SupportsWeakPtr<WebMediaPlayerImpl> { 65 public base::SupportsWeakPtr<WebMediaPlayerImpl> {
65 public: 66 public:
66 // Constructs a WebMediaPlayer implementation using Chromium's media stack. 67 // Constructs a WebMediaPlayer implementation using Chromium's media stack.
67 // |delegate| may be null. |renderer| may also be null, in which case an 68 // |delegate| may be null. |renderer| may also be null, in which case an
68 // internal renderer will be created. 69 // internal renderer will be created.
69 // TODO(xhwang): Drop the internal renderer path and always pass in a renderer 70 // TODO(xhwang): Drop the internal renderer path and always pass in a renderer
70 // here. 71 // here.
71 WebMediaPlayerImpl(blink::WebLocalFrame* frame, 72 WebMediaPlayerImpl(
72 blink::WebMediaPlayerClient* client, 73 blink::WebLocalFrame* frame,
73 base::WeakPtr<WebMediaPlayerDelegate> delegate, 74 blink::WebMediaPlayerClient* client,
74 scoped_ptr<RendererFactory> renderer_factory, 75 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client,
75 CdmFactory* cdm_factory, 76 base::WeakPtr<WebMediaPlayerDelegate> delegate,
76 const WebMediaPlayerParams& params); 77 scoped_ptr<RendererFactory> renderer_factory,
78 CdmFactory* cdm_factory,
79 const WebMediaPlayerParams& params);
77 virtual ~WebMediaPlayerImpl(); 80 virtual ~WebMediaPlayerImpl();
78 81
79 virtual void load(LoadType load_type, 82 virtual void load(LoadType load_type,
80 const blink::WebURL& url, 83 const blink::WebURL& url,
81 CORSMode cors_mode); 84 CORSMode cors_mode);
82 85
83 // Playback controls. 86 // Playback controls.
84 virtual void play(); 87 virtual void play();
85 virtual void pause(); 88 virtual void pause();
86 virtual bool supportsSave() const; 89 virtual bool supportsSave() const;
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 // will have effect. 285 // will have effect.
283 bool pending_seek_; 286 bool pending_seek_;
284 // |pending_seek_time_| is meaningless when |pending_seek_| is false. 287 // |pending_seek_time_| is meaningless when |pending_seek_| is false.
285 base::TimeDelta pending_seek_time_; 288 base::TimeDelta pending_seek_time_;
286 289
287 // Tracks whether to issue time changed notifications during buffering state 290 // Tracks whether to issue time changed notifications during buffering state
288 // changes. 291 // changes.
289 bool should_notify_time_changed_; 292 bool should_notify_time_changed_;
290 293
291 blink::WebMediaPlayerClient* client_; 294 blink::WebMediaPlayerClient* client_;
295 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client_;
292 296
293 base::WeakPtr<WebMediaPlayerDelegate> delegate_; 297 base::WeakPtr<WebMediaPlayerDelegate> delegate_;
294 298
295 WebMediaPlayerParams::DeferLoadCB defer_load_cb_; 299 WebMediaPlayerParams::DeferLoadCB defer_load_cb_;
296 WebMediaPlayerParams::Context3DCB context_3d_cb_; 300 WebMediaPlayerParams::Context3DCB context_3d_cb_;
297 301
298 // Routes audio playback to either AudioRendererSink or WebAudio. 302 // Routes audio playback to either AudioRendererSink or WebAudio.
299 scoped_refptr<WebAudioSourceProviderImpl> audio_source_provider_; 303 scoped_refptr<WebAudioSourceProviderImpl> audio_source_provider_;
300 304
301 bool supports_save_; 305 bool supports_save_;
(...skipping 22 matching lines...) Expand all
324 EncryptedMediaPlayerSupport encrypted_media_support_; 328 EncryptedMediaPlayerSupport encrypted_media_support_;
325 329
326 scoped_ptr<RendererFactory> renderer_factory_; 330 scoped_ptr<RendererFactory> renderer_factory_;
327 331
328 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 332 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
329 }; 333 };
330 334
331 } // namespace media 335 } // namespace media
332 336
333 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 337 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
OLDNEW
« no previous file with comments | « media/blink/encrypted_media_player_support.cc ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698