OLD | NEW |
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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 // requests the stream. As a result, we cannot guarantee there is only | 232 // requests the stream. As a result, we cannot guarantee there is only |
233 // a single origin. Remove the following line when b/12573548 is fixed. | 233 // a single origin. Remove the following line when b/12573548 is fixed. |
234 // Check http://crbug.com/334204. | 234 // Check http://crbug.com/334204. |
235 info_loader_->set_single_origin(false); | 235 info_loader_->set_single_origin(false); |
236 info_loader_->Start(frame_); | 236 info_loader_->Start(frame_); |
237 } | 237 } |
238 | 238 |
239 url_ = url; | 239 url_ = url; |
240 GURL first_party_url = frame_->document().firstPartyForCookies(); | 240 GURL first_party_url = frame_->document().firstPartyForCookies(); |
241 player_manager_->Initialize( | 241 player_manager_->Initialize( |
242 player_type_, player_id_, url, first_party_url, demuxer_client_id); | 242 player_type_, player_id_, url, first_party_url, demuxer_client_id, |
| 243 frame_->document().url()); |
243 | 244 |
244 if (player_manager_->ShouldEnterFullscreen(frame_)) | 245 if (player_manager_->ShouldEnterFullscreen(frame_)) |
245 player_manager_->EnterFullscreen(player_id_, frame_); | 246 player_manager_->EnterFullscreen(player_id_, frame_); |
246 | 247 |
247 UpdateNetworkState(WebMediaPlayer::NetworkStateLoading); | 248 UpdateNetworkState(WebMediaPlayer::NetworkStateLoading); |
248 UpdateReadyState(WebMediaPlayer::ReadyStateHaveNothing); | 249 UpdateReadyState(WebMediaPlayer::ReadyStateHaveNothing); |
249 } | 250 } |
250 | 251 |
251 void WebMediaPlayerAndroid::DidLoadMediaInfo(MediaInfoLoader::Status status) { | 252 void WebMediaPlayerAndroid::DidLoadMediaInfo(MediaInfoLoader::Status status) { |
252 DCHECK(!media_source_delegate_); | 253 DCHECK(!media_source_delegate_); |
(...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1547 | 1548 |
1548 void WebMediaPlayerAndroid::exitFullscreen() { | 1549 void WebMediaPlayerAndroid::exitFullscreen() { |
1549 player_manager_->ExitFullscreen(player_id_); | 1550 player_manager_->ExitFullscreen(player_id_); |
1550 } | 1551 } |
1551 | 1552 |
1552 bool WebMediaPlayerAndroid::canEnterFullscreen() const { | 1553 bool WebMediaPlayerAndroid::canEnterFullscreen() const { |
1553 return player_manager_->CanEnterFullscreen(frame_); | 1554 return player_manager_->CanEnterFullscreen(frame_); |
1554 } | 1555 } |
1555 | 1556 |
1556 } // namespace content | 1557 } // namespace content |
OLD | NEW |