OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "webkit/media/android/webmediaplayer_impl_android.h" | 5 #include "webkit/media/android/webmediaplayer_impl_android.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "media/base/android/media_player_bridge.h" | 9 #include "media/base/android/media_player_bridge.h" |
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 proxy_->ExitFullscreen(player_id()); | 50 proxy_->ExitFullscreen(player_id()); |
51 } | 51 } |
52 | 52 |
53 bool WebMediaPlayerImplAndroid::canEnterFullscreen() const { | 53 bool WebMediaPlayerImplAndroid::canEnterFullscreen() const { |
54 return manager()->CanEnterFullscreen(frame_); | 54 return manager()->CanEnterFullscreen(frame_); |
55 } | 55 } |
56 | 56 |
57 void WebMediaPlayerImplAndroid::InitializeMediaPlayer(GURL url) { | 57 void WebMediaPlayerImplAndroid::InitializeMediaPlayer(GURL url) { |
58 GURL first_party_url = frame_->document().firstPartyForCookies(); | 58 GURL first_party_url = frame_->document().firstPartyForCookies(); |
59 if (proxy_) { | 59 if (proxy_) { |
60 proxy_->Initialize(player_id(), url.spec(), first_party_url.spec()); | 60 proxy_->Initialize(player_id(), url, first_party_url); |
61 if (manager()->IsInFullscreen(frame_)) | 61 if (manager()->IsInFullscreen(frame_)) |
62 proxy_->EnterFullscreen(player_id()); | 62 proxy_->EnterFullscreen(player_id()); |
63 } | 63 } |
64 | 64 |
65 UpdateNetworkState(WebMediaPlayer::NetworkStateLoading); | 65 UpdateNetworkState(WebMediaPlayer::NetworkStateLoading); |
66 UpdateReadyState(WebMediaPlayer::ReadyStateHaveNothing); | 66 UpdateReadyState(WebMediaPlayer::ReadyStateHaveNothing); |
67 } | 67 } |
68 | 68 |
69 void WebMediaPlayerImplAndroid::PlayInternal() { | 69 void WebMediaPlayerImplAndroid::PlayInternal() { |
70 if (paused() && proxy_) | 70 if (paused() && proxy_) |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 client()->playbackStateChanged(); | 125 client()->playbackStateChanged(); |
126 } | 126 } |
127 | 127 |
128 void WebMediaPlayerImplAndroid::Destroy() { | 128 void WebMediaPlayerImplAndroid::Destroy() { |
129 proxy_ = NULL; | 129 proxy_ = NULL; |
130 } | 130 } |
131 | 131 |
132 void WebMediaPlayerImplAndroid::SetVideoSurface(jobject j_surface) {} | 132 void WebMediaPlayerImplAndroid::SetVideoSurface(jobject j_surface) {} |
133 | 133 |
134 } // namespace webkit_media | 134 } // namespace webkit_media |
OLD | NEW |