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 "webkit/renderer/media/android/webmediaplayer_android.h" | 5 #include "webkit/renderer/media/android/webmediaplayer_android.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1013 return WebMediaPlayer::MediaKeyExceptionInvalidPlayerState; | 1013 return WebMediaPlayer::MediaKeyExceptionInvalidPlayerState; |
1014 | 1014 |
1015 decryptor_->CancelKeyRequest(session_id.utf8()); | 1015 decryptor_->CancelKeyRequest(session_id.utf8()); |
1016 return WebMediaPlayer::MediaKeyExceptionNoError; | 1016 return WebMediaPlayer::MediaKeyExceptionNoError; |
1017 } | 1017 } |
1018 | 1018 |
1019 void WebMediaPlayerAndroid::OnKeyAdded(const std::string& session_id) { | 1019 void WebMediaPlayerAndroid::OnKeyAdded(const std::string& session_id) { |
1020 EmeUMAHistogramCounts(current_key_system_.utf8(), "KeyAdded", 1); | 1020 EmeUMAHistogramCounts(current_key_system_.utf8(), "KeyAdded", 1); |
1021 | 1021 |
1022 if (media_source_delegate_) | 1022 if (media_source_delegate_) |
1023 media_source_delegate_->NotifyDemuxerReady(current_key_system_.utf8()); | 1023 media_source_delegate_->NotifyKeyAdded(current_key_system_.utf8()); |
1024 | 1024 |
1025 client_->keyAdded(current_key_system_, WebString::fromUTF8(session_id)); | 1025 client_->keyAdded(current_key_system_, WebString::fromUTF8(session_id)); |
1026 } | 1026 } |
1027 | 1027 |
1028 void WebMediaPlayerAndroid::OnKeyError(const std::string& session_id, | 1028 void WebMediaPlayerAndroid::OnKeyError(const std::string& session_id, |
1029 media::MediaKeys::KeyError error_code, | 1029 media::MediaKeys::KeyError error_code, |
1030 int system_code) { | 1030 int system_code) { |
1031 EmeUMAHistogramEnumeration(current_key_system_.utf8(), "KeyError", | 1031 EmeUMAHistogramEnumeration(current_key_system_.utf8(), "KeyError", |
1032 error_code, media::MediaKeys::kMaxKeyError); | 1032 error_code, media::MediaKeys::kMaxKeyError); |
1033 | 1033 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1104 | 1104 |
1105 void WebMediaPlayerAndroid::exitFullscreen() { | 1105 void WebMediaPlayerAndroid::exitFullscreen() { |
1106 proxy_->ExitFullscreen(player_id_); | 1106 proxy_->ExitFullscreen(player_id_); |
1107 } | 1107 } |
1108 | 1108 |
1109 bool WebMediaPlayerAndroid::canEnterFullscreen() const { | 1109 bool WebMediaPlayerAndroid::canEnterFullscreen() const { |
1110 return manager_->CanEnterFullscreen(frame_); | 1110 return manager_->CanEnterFullscreen(frame_); |
1111 } | 1111 } |
1112 | 1112 |
1113 } // namespace webkit_media | 1113 } // namespace webkit_media |
OLD | NEW |