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

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

Issue 17449020: Call NotifyDemuxerReady() only once while keys are added. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resolved Min's comment and rebased Created 7 years, 6 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 | « webkit/renderer/media/android/media_source_delegate.cc ('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 "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
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
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
OLDNEW
« no previous file with comments | « webkit/renderer/media/android/media_source_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698