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

Side by Side Diff: media/base/media_url_demuxer.h

Issue 2434413002: Plumb firstPartyForCookies() to MediaPlayerBridge (Closed)
Patch Set: Added bug number to TODO Created 4 years, 2 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_BASE_MEDIA_URL_DEMUXER_H_ 5 #ifndef MEDIA_BASE_MEDIA_URL_DEMUXER_H_
6 #define MEDIA_BASE_MEDIA_URL_DEMUXER_H_ 6 #define MEDIA_BASE_MEDIA_URL_DEMUXER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 12 matching lines...) Expand all
23 // its implementation of the Demuxer are NOPs that return the default values and 23 // its implementation of the Demuxer are NOPs that return the default values and
24 // fire any provided callbacks immediately. 24 // fire any provided callbacks immediately.
25 // 25 //
26 // If Pipeline where to be refactored to use a DemuxerStreamProvider instead of 26 // If Pipeline where to be refactored to use a DemuxerStreamProvider instead of
27 // a Demuxer, MediaUrlDemuxer should be refactored to inherit directly from 27 // a Demuxer, MediaUrlDemuxer should be refactored to inherit directly from
28 // DemuxerStreamProvider. 28 // DemuxerStreamProvider.
29 class MEDIA_EXPORT MediaUrlDemuxer : public Demuxer { 29 class MEDIA_EXPORT MediaUrlDemuxer : public Demuxer {
30 public: 30 public:
31 MediaUrlDemuxer( 31 MediaUrlDemuxer(
32 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 32 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
33 const GURL& url); 33 const GURL& media_url,
34 const GURL& first_party_for_cookies);
34 ~MediaUrlDemuxer() override; 35 ~MediaUrlDemuxer() override;
35 36
36 // DemuxerStreamProvider interface. 37 // DemuxerStreamProvider interface.
37 DemuxerStream* GetStream(DemuxerStream::Type type) override; 38 DemuxerStream* GetStream(DemuxerStream::Type type) override;
38 GURL GetUrl() const override; 39 MediaUrlParams GetMediaUrlParams() const override;
39 DemuxerStreamProvider::Type GetType() const override; 40 DemuxerStreamProvider::Type GetType() const override;
40 41
41 // Demuxer interface. 42 // Demuxer interface.
42 std::string GetDisplayName() const override; 43 std::string GetDisplayName() const override;
43 void Initialize(DemuxerHost* host, 44 void Initialize(DemuxerHost* host,
44 const PipelineStatusCB& status_cb, 45 const PipelineStatusCB& status_cb,
45 bool enable_text_tracks) override; 46 bool enable_text_tracks) override;
46 void StartWaitingForSeek(base::TimeDelta seek_time) override; 47 void StartWaitingForSeek(base::TimeDelta seek_time) override;
47 void CancelPendingSeek(base::TimeDelta seek_time) override; 48 void CancelPendingSeek(base::TimeDelta seek_time) override;
48 void Seek(base::TimeDelta time, const PipelineStatusCB& status_cb) override; 49 void Seek(base::TimeDelta time, const PipelineStatusCB& status_cb) override;
49 void Stop() override; 50 void Stop() override;
50 void AbortPendingReads() override; 51 void AbortPendingReads() override;
51 base::TimeDelta GetStartTime() const override; 52 base::TimeDelta GetStartTime() const override;
52 base::Time GetTimelineOffset() const override; 53 base::Time GetTimelineOffset() const override;
53 int64_t GetMemoryUsage() const override; 54 int64_t GetMemoryUsage() const override;
54 void OnEnabledAudioTracksChanged(const std::vector<MediaTrack::Id>& track_ids, 55 void OnEnabledAudioTracksChanged(const std::vector<MediaTrack::Id>& track_ids,
55 base::TimeDelta currTime) override; 56 base::TimeDelta currTime) override;
56 void OnSelectedVideoTrackChanged(const std::vector<MediaTrack::Id>& track_ids, 57 void OnSelectedVideoTrackChanged(const std::vector<MediaTrack::Id>& track_ids,
57 base::TimeDelta currTime) override; 58 base::TimeDelta currTime) override;
58 59
59 private: 60 private:
60 GURL url_; 61 MediaUrlParams params_;
61 62
62 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 63 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
63 64
64 DISALLOW_COPY_AND_ASSIGN(MediaUrlDemuxer); 65 DISALLOW_COPY_AND_ASSIGN(MediaUrlDemuxer);
65 }; 66 };
66 67
67 } // namespace media 68 } // namespace media
68 69
69 #endif // MEDIA_BASE_MEDIA_URL_DEMUXER_H_ 70 #endif // MEDIA_BASE_MEDIA_URL_DEMUXER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698