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

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

Issue 2815303006: Convert MediaLog from being ref counted to owned by WebMediaPlayer. (Closed)
Patch Set: Rebase. Created 3 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
« no previous file with comments | « media/blink/webencryptedmediaclient_impl.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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 public: 93 public:
94 // Constructs a WebMediaPlayer implementation using Chromium's media stack. 94 // Constructs a WebMediaPlayer implementation using Chromium's media stack.
95 // |delegate| and |renderer_factory| must not be null. 95 // |delegate| and |renderer_factory| must not be null.
96 WebMediaPlayerImpl( 96 WebMediaPlayerImpl(
97 blink::WebLocalFrame* frame, 97 blink::WebLocalFrame* frame,
98 blink::WebMediaPlayerClient* client, 98 blink::WebMediaPlayerClient* client,
99 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client, 99 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client,
100 WebMediaPlayerDelegate* delegate, 100 WebMediaPlayerDelegate* delegate,
101 std::unique_ptr<RendererFactory> renderer_factory, 101 std::unique_ptr<RendererFactory> renderer_factory,
102 linked_ptr<UrlIndex> url_index, 102 linked_ptr<UrlIndex> url_index,
103 const WebMediaPlayerParams& params); 103 std::unique_ptr<WebMediaPlayerParams> params);
104 ~WebMediaPlayerImpl() override; 104 ~WebMediaPlayerImpl() override;
105 105
106 void Load(LoadType load_type, 106 void Load(LoadType load_type,
107 const blink::WebMediaPlayerSource& source, 107 const blink::WebMediaPlayerSource& source,
108 CORSMode cors_mode) override; 108 CORSMode cors_mode) override;
109 109
110 // Playback controls. 110 // Playback controls.
111 void Play() override; 111 void Play() override;
112 void Pause() override; 112 void Pause() override;
113 bool SupportsSave() const override; 113 bool SupportsSave() const override;
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 474
475 // Preload state for when |data_source_| is created after setPreload(). 475 // Preload state for when |data_source_| is created after setPreload().
476 MultibufferDataSource::Preload preload_; 476 MultibufferDataSource::Preload preload_;
477 477
478 // Task runner for posting tasks on Chrome's main thread. Also used 478 // Task runner for posting tasks on Chrome's main thread. Also used
479 // for DCHECKs so methods calls won't execute in the wrong thread. 479 // for DCHECKs so methods calls won't execute in the wrong thread.
480 const scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; 480 const scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
481 481
482 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_; 482 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_;
483 scoped_refptr<base::TaskRunner> worker_task_runner_; 483 scoped_refptr<base::TaskRunner> worker_task_runner_;
484 scoped_refptr<MediaLog> media_log_; 484 std::unique_ptr<MediaLog> media_log_;
485 485
486 // |pipeline_controller_| owns an instance of Pipeline. 486 // |pipeline_controller_| owns an instance of Pipeline.
487 PipelineController pipeline_controller_; 487 PipelineController pipeline_controller_;
488 488
489 // The LoadType passed in the |load_type| parameter of the load() call. 489 // The LoadType passed in the |load_type| parameter of the load() call.
490 LoadType load_type_; 490 LoadType load_type_;
491 491
492 // Cache of metadata for answering hasAudio(), hasVideo(), and naturalSize(). 492 // Cache of metadata for answering hasAudio(), hasVideo(), and naturalSize().
493 PipelineMetadata pipeline_metadata_; 493 PipelineMetadata pipeline_metadata_;
494 494
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 base::CancelableCallback<void(base::TimeTicks)> frame_time_report_cb_; 724 base::CancelableCallback<void(base::TimeTicks)> frame_time_report_cb_;
725 725
726 bool initial_video_height_recorded_ = false; 726 bool initial_video_height_recorded_ = false;
727 727
728 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 728 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
729 }; 729 };
730 730
731 } // namespace media 731 } // namespace media
732 732
733 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 733 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
OLDNEW
« no previous file with comments | « media/blink/webencryptedmediaclient_impl.cc ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698