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

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

Issue 2815303006: Convert MediaLog from being ref counted to owned by WebMediaPlayer. (Closed)
Patch Set: Actually fix fuzzers. 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
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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 472
473 // Preload state for when |data_source_| is created after setPreload(). 473 // Preload state for when |data_source_| is created after setPreload().
474 MultibufferDataSource::Preload preload_; 474 MultibufferDataSource::Preload preload_;
475 475
476 // Task runner for posting tasks on Chrome's main thread. Also used 476 // Task runner for posting tasks on Chrome's main thread. Also used
477 // for DCHECKs so methods calls won't execute in the wrong thread. 477 // for DCHECKs so methods calls won't execute in the wrong thread.
478 const scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; 478 const scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
479 479
480 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_; 480 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_;
481 scoped_refptr<base::TaskRunner> worker_task_runner_; 481 scoped_refptr<base::TaskRunner> worker_task_runner_;
482 scoped_refptr<MediaLog> media_log_; 482 std::unique_ptr<MediaLog> media_log_;
483 483
484 // |pipeline_controller_| owns an instance of Pipeline. 484 // |pipeline_controller_| owns an instance of Pipeline.
485 PipelineController pipeline_controller_; 485 PipelineController pipeline_controller_;
486 486
487 // The LoadType passed in the |load_type| parameter of the load() call. 487 // The LoadType passed in the |load_type| parameter of the load() call.
488 LoadType load_type_; 488 LoadType load_type_;
489 489
490 // Cache of metadata for answering hasAudio(), hasVideo(), and naturalSize(). 490 // Cache of metadata for answering hasAudio(), hasVideo(), and naturalSize().
491 PipelineMetadata pipeline_metadata_; 491 PipelineMetadata pipeline_metadata_;
492 492
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 base::TimeDelta last_uploaded_frame_timestamp_; 720 base::TimeDelta last_uploaded_frame_timestamp_;
721 721
722 base::CancelableCallback<void(base::TimeTicks)> frame_time_report_cb_; 722 base::CancelableCallback<void(base::TimeTicks)> frame_time_report_cb_;
723 723
724 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 724 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
725 }; 725 };
726 726
727 } // namespace media 727 } // namespace media
728 728
729 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 729 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698