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

Side by Side Diff: content/renderer/media/android/webmediaplayer_android.cc

Issue 247573004: Always mark cross-origin as true for regular media urls (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix MediaInfoLoaderTest Created 6 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/media/android/media_info_loader.h ('k') | no next file » | 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 "content/renderer/media/android/webmediaplayer_android.h" 5 #include "content/renderer/media/android/webmediaplayer_android.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 base::Bind(&WebMediaPlayerAndroid::OnDurationChanged, 212 base::Bind(&WebMediaPlayerAndroid::OnDurationChanged,
213 weak_factory_.GetWeakPtr())); 213 weak_factory_.GetWeakPtr()));
214 } 214 }
215 } else { 215 } else {
216 info_loader_.reset( 216 info_loader_.reset(
217 new MediaInfoLoader( 217 new MediaInfoLoader(
218 url, 218 url,
219 cors_mode, 219 cors_mode,
220 base::Bind(&WebMediaPlayerAndroid::DidLoadMediaInfo, 220 base::Bind(&WebMediaPlayerAndroid::DidLoadMediaInfo,
221 weak_factory_.GetWeakPtr()))); 221 weak_factory_.GetWeakPtr())));
222 // TODO(qinmin): The url might be redirected when android media player
223 // requests the stream. As a result, we cannot guarantee there is only
224 // a single origin. Remove the following line when b/12573548 is fixed.
225 // Check http://crbug.com/334204.
226 info_loader_->set_single_origin(false);
222 info_loader_->Start(frame_); 227 info_loader_->Start(frame_);
223 } 228 }
224 229
225 url_ = url; 230 url_ = url;
226 GURL first_party_url = frame_->document().firstPartyForCookies(); 231 GURL first_party_url = frame_->document().firstPartyForCookies();
227 manager_->Initialize( 232 manager_->Initialize(
228 player_type_, player_id_, url, first_party_url, demuxer_client_id); 233 player_type_, player_id_, url, first_party_url, demuxer_client_id);
229 234
230 if (manager_->ShouldEnterFullscreen(frame_)) 235 if (manager_->ShouldEnterFullscreen(frame_))
231 manager_->EnterFullscreen(player_id_, frame_); 236 manager_->EnterFullscreen(player_id_, frame_);
(...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after
1538 1543
1539 void WebMediaPlayerAndroid::exitFullscreen() { 1544 void WebMediaPlayerAndroid::exitFullscreen() {
1540 manager_->ExitFullscreen(player_id_); 1545 manager_->ExitFullscreen(player_id_);
1541 } 1546 }
1542 1547
1543 bool WebMediaPlayerAndroid::canEnterFullscreen() const { 1548 bool WebMediaPlayerAndroid::canEnterFullscreen() const {
1544 return manager_->CanEnterFullscreen(frame_); 1549 return manager_->CanEnterFullscreen(frame_);
1545 } 1550 }
1546 1551
1547 } // namespace content 1552 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/android/media_info_loader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698