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

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

Issue 2434413002: Plumb firstPartyForCookies() to MediaPlayerBridge (Closed)
Patch Set: Clarified comments. 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
« no previous file with comments | « media/base/pipeline_impl.cc ('k') | media/mojo/clients/mojo_renderer.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 #include "media/blink/webmediaplayer_impl.h" 5 #include "media/blink/webmediaplayer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <limits> 9 #include <limits>
10 #include <string> 10 #include <string>
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "third_party/WebKit/public/platform/WebEncryptedMediaTypes.h" 52 #include "third_party/WebKit/public/platform/WebEncryptedMediaTypes.h"
53 #include "third_party/WebKit/public/platform/WebMediaPlayerClient.h" 53 #include "third_party/WebKit/public/platform/WebMediaPlayerClient.h"
54 #include "third_party/WebKit/public/platform/WebMediaPlayerEncryptedMediaClient. h" 54 #include "third_party/WebKit/public/platform/WebMediaPlayerEncryptedMediaClient. h"
55 #include "third_party/WebKit/public/platform/WebMediaPlayerSource.h" 55 #include "third_party/WebKit/public/platform/WebMediaPlayerSource.h"
56 #include "third_party/WebKit/public/platform/WebMediaSource.h" 56 #include "third_party/WebKit/public/platform/WebMediaSource.h"
57 #include "third_party/WebKit/public/platform/WebRect.h" 57 #include "third_party/WebKit/public/platform/WebRect.h"
58 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" 58 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h"
59 #include "third_party/WebKit/public/platform/WebSize.h" 59 #include "third_party/WebKit/public/platform/WebSize.h"
60 #include "third_party/WebKit/public/platform/WebString.h" 60 #include "third_party/WebKit/public/platform/WebString.h"
61 #include "third_party/WebKit/public/platform/WebURL.h" 61 #include "third_party/WebKit/public/platform/WebURL.h"
62 #include "third_party/WebKit/public/web/WebDocument.h"
62 #include "third_party/WebKit/public/web/WebFrame.h" 63 #include "third_party/WebKit/public/web/WebFrame.h"
63 #include "third_party/WebKit/public/web/WebLocalFrame.h" 64 #include "third_party/WebKit/public/web/WebLocalFrame.h"
64 #include "third_party/WebKit/public/web/WebView.h" 65 #include "third_party/WebKit/public/web/WebView.h"
65 66
66 #if defined(OS_ANDROID) 67 #if defined(OS_ANDROID)
67 #include "media/base/android/media_codec_util.h" 68 #include "media/base/android/media_codec_util.h"
68 #endif 69 #endif
69 70
70 using blink::WebCanvas; 71 using blink::WebCanvas;
71 using blink::WebMediaPlayer; 72 using blink::WebMediaPlayer;
(...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after
1509 compositor_, request_surface_cb); 1510 compositor_, request_surface_cb);
1510 } 1511 }
1511 1512
1512 void WebMediaPlayerImpl::StartPipeline() { 1513 void WebMediaPlayerImpl::StartPipeline() {
1513 DCHECK(main_task_runner_->BelongsToCurrentThread()); 1514 DCHECK(main_task_runner_->BelongsToCurrentThread());
1514 1515
1515 Demuxer::EncryptedMediaInitDataCB encrypted_media_init_data_cb = 1516 Demuxer::EncryptedMediaInitDataCB encrypted_media_init_data_cb =
1516 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnEncryptedMediaInitData); 1517 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnEncryptedMediaInitData);
1517 1518
1518 if (use_fallback_path_) { 1519 if (use_fallback_path_) {
1519 demuxer_.reset(new MediaUrlDemuxer(media_task_runner_, fallback_url_)); 1520 demuxer_.reset(
1521 new MediaUrlDemuxer(media_task_runner_, fallback_url_,
1522 frame_->document().firstPartyForCookies()));
1520 pipeline_controller_.Start(demuxer_.get(), this, false, false); 1523 pipeline_controller_.Start(demuxer_.get(), this, false, false);
1521 return; 1524 return;
1522 } 1525 }
1523 1526
1524 // Figure out which demuxer to use. 1527 // Figure out which demuxer to use.
1525 if (load_type_ != LoadTypeMediaSource) { 1528 if (load_type_ != LoadTypeMediaSource) {
1526 DCHECK(!chunk_demuxer_); 1529 DCHECK(!chunk_demuxer_);
1527 DCHECK(data_source_); 1530 DCHECK(data_source_);
1528 1531
1529 #if !defined(MEDIA_DISABLE_FFMPEG) 1532 #if !defined(MEDIA_DISABLE_FFMPEG)
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
1884 pipeline_metadata_.natural_size, 1887 pipeline_metadata_.natural_size,
1885 base::Bind(&GetCurrentTimeInternal, this))); 1888 base::Bind(&GetCurrentTimeInternal, this)));
1886 watch_time_reporter_->OnVolumeChange(volume_); 1889 watch_time_reporter_->OnVolumeChange(volume_);
1887 if (delegate_ && delegate_->IsHidden()) 1890 if (delegate_ && delegate_->IsHidden())
1888 watch_time_reporter_->OnHidden(); 1891 watch_time_reporter_->OnHidden();
1889 else 1892 else
1890 watch_time_reporter_->OnShown(); 1893 watch_time_reporter_->OnShown();
1891 } 1894 }
1892 1895
1893 } // namespace media 1896 } // namespace media
OLDNEW
« no previous file with comments | « media/base/pipeline_impl.cc ('k') | media/mojo/clients/mojo_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698