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

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: Created 5 years, 7 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 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 "third_party/WebKit/public/platform/WebAudioSourceProvider.h" 28 #include "third_party/WebKit/public/platform/WebAudioSourceProvider.h"
29 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h" 29 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h"
30 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" 30 #include "third_party/WebKit/public/platform/WebMediaPlayer.h"
31 #include "third_party/WebKit/public/platform/WebMediaPlayerClient.h" 31 #include "third_party/WebKit/public/platform/WebMediaPlayerClient.h"
32 #include "third_party/WebKit/public/platform/WebMediaPlayerEncryptedMediaClient. h"
32 #include "url/gurl.h" 33 #include "url/gurl.h"
33 34
34 namespace blink { 35 namespace blink {
35 class WebGraphicsContext3D; 36 class WebGraphicsContext3D;
36 class WebLocalFrame; 37 class WebLocalFrame;
37 } 38 }
38 39
39 namespace base { 40 namespace base {
40 class SingleThreadTaskRunner; 41 class SingleThreadTaskRunner;
41 } 42 }
(...skipping 18 matching lines...) Expand all
60 // Encrypted Media. 61 // Encrypted Media.
61 class MEDIA_EXPORT WebMediaPlayerImpl 62 class MEDIA_EXPORT WebMediaPlayerImpl
62 : public NON_EXPORTED_BASE(blink::WebMediaPlayer), 63 : public NON_EXPORTED_BASE(blink::WebMediaPlayer),
63 public base::SupportsWeakPtr<WebMediaPlayerImpl> { 64 public base::SupportsWeakPtr<WebMediaPlayerImpl> {
64 public: 65 public:
65 // Constructs a WebMediaPlayer implementation using Chromium's media stack. 66 // Constructs a WebMediaPlayer implementation using Chromium's media stack.
66 // |delegate| may be null. |renderer| may also be null, in which case an 67 // |delegate| may be null. |renderer| may also be null, in which case an
67 // internal renderer will be created. 68 // internal renderer will be created.
68 // TODO(xhwang): Drop the internal renderer path and always pass in a renderer 69 // TODO(xhwang): Drop the internal renderer path and always pass in a renderer
69 // here. 70 // here.
70 WebMediaPlayerImpl(blink::WebLocalFrame* frame, 71 WebMediaPlayerImpl(
71 blink::WebMediaPlayerClient* client, 72 blink::WebLocalFrame* frame,
72 base::WeakPtr<WebMediaPlayerDelegate> delegate, 73 blink::WebMediaPlayerClient* client,
73 scoped_ptr<RendererFactory> renderer_factory, 74 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client,
74 CdmFactory* cdm_factory, 75 base::WeakPtr<WebMediaPlayerDelegate> delegate,
75 const WebMediaPlayerParams& params); 76 scoped_ptr<RendererFactory> renderer_factory,
77 CdmFactory* cdm_factory,
78 const WebMediaPlayerParams& params);
76 virtual ~WebMediaPlayerImpl(); 79 virtual ~WebMediaPlayerImpl();
77 80
78 virtual void load(LoadType load_type, 81 virtual void load(LoadType load_type,
79 const blink::WebURL& url, 82 const blink::WebURL& url,
80 CORSMode cors_mode); 83 CORSMode cors_mode);
81 84
82 // Playback controls. 85 // Playback controls.
83 virtual void play(); 86 virtual void play();
84 virtual void pause(); 87 virtual void pause();
85 virtual bool supportsSave() const; 88 virtual bool supportsSave() const;
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 // Seek gets pending if another seek is in progress. Only last pending seek 289 // Seek gets pending if another seek is in progress. Only last pending seek
287 // will have effect. 290 // will have effect.
288 bool pending_seek_; 291 bool pending_seek_;
289 double pending_seek_seconds_; 292 double pending_seek_seconds_;
290 293
291 // Tracks whether to issue time changed notifications during buffering state 294 // Tracks whether to issue time changed notifications during buffering state
292 // changes. 295 // changes.
293 bool should_notify_time_changed_; 296 bool should_notify_time_changed_;
294 297
295 blink::WebMediaPlayerClient* client_; 298 blink::WebMediaPlayerClient* client_;
299 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client_;
296 300
297 base::WeakPtr<WebMediaPlayerDelegate> delegate_; 301 base::WeakPtr<WebMediaPlayerDelegate> delegate_;
298 302
299 WebMediaPlayerParams::DeferLoadCB defer_load_cb_; 303 WebMediaPlayerParams::DeferLoadCB defer_load_cb_;
300 WebMediaPlayerParams::Context3DCB context_3d_cb_; 304 WebMediaPlayerParams::Context3DCB context_3d_cb_;
301 305
302 // Routes audio playback to either AudioRendererSink or WebAudio. 306 // Routes audio playback to either AudioRendererSink or WebAudio.
303 scoped_refptr<WebAudioSourceProviderImpl> audio_source_provider_; 307 scoped_refptr<WebAudioSourceProviderImpl> audio_source_provider_;
304 308
305 bool supports_save_; 309 bool supports_save_;
(...skipping 22 matching lines...) Expand all
328 EncryptedMediaPlayerSupport encrypted_media_support_; 332 EncryptedMediaPlayerSupport encrypted_media_support_;
329 333
330 scoped_ptr<RendererFactory> renderer_factory_; 334 scoped_ptr<RendererFactory> renderer_factory_;
331 335
332 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 336 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
333 }; 337 };
334 338
335 } // namespace media 339 } // namespace media
336 340
337 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 341 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698