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

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: 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
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 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 proxy_->CancelKeyRequest(player_id_, session_id.utf8()); 1029 proxy_->CancelKeyRequest(player_id_, session_id.utf8());
1030 #endif // #if defined(GOOGLE_TV) 1030 #endif // #if defined(GOOGLE_TV)
1031 1031
1032 return WebMediaPlayer::MediaKeyExceptionNoError; 1032 return WebMediaPlayer::MediaKeyExceptionNoError;
1033 } 1033 }
1034 1034
1035 void WebMediaPlayerAndroid::OnKeyAdded(const std::string& session_id) { 1035 void WebMediaPlayerAndroid::OnKeyAdded(const std::string& session_id) {
1036 EmeUMAHistogramCounts(current_key_system_.utf8(), "KeyAdded", 1); 1036 EmeUMAHistogramCounts(current_key_system_.utf8(), "KeyAdded", 1);
1037 1037
1038 if (media_source_delegate_) 1038 if (media_source_delegate_)
1039 media_source_delegate_->NotifyDemuxerReady(current_key_system_.utf8()); 1039 media_source_delegate_->NotifyKeyAdded(
1040 current_key_system_.utf8(), session_id);
xhwang 2013/06/20 17:30:50 Why is MSD interested in what key system it is?
kjyoun 2013/06/21 00:05:39 MSD needs to know key_system in order to pass it t
1040 1041
1041 client_->keyAdded(current_key_system_, WebString::fromUTF8(session_id)); 1042 client_->keyAdded(current_key_system_, WebString::fromUTF8(session_id));
1042 } 1043 }
1043 1044
1044 void WebMediaPlayerAndroid::OnKeyError(const std::string& session_id, 1045 void WebMediaPlayerAndroid::OnKeyError(const std::string& session_id,
1045 media::MediaKeys::KeyError error_code, 1046 media::MediaKeys::KeyError error_code,
1046 int system_code) { 1047 int system_code) {
1047 EmeUMAHistogramEnumeration(current_key_system_.utf8(), "KeyError", 1048 EmeUMAHistogramEnumeration(current_key_system_.utf8(), "KeyError",
1048 error_code, media::MediaKeys::kMaxKeyError); 1049 error_code, media::MediaKeys::kMaxKeyError);
1049 1050
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1120 1121
1121 void WebMediaPlayerAndroid::exitFullscreen() { 1122 void WebMediaPlayerAndroid::exitFullscreen() {
1122 proxy_->ExitFullscreen(player_id_); 1123 proxy_->ExitFullscreen(player_id_);
1123 } 1124 }
1124 1125
1125 bool WebMediaPlayerAndroid::canEnterFullscreen() const { 1126 bool WebMediaPlayerAndroid::canEnterFullscreen() const {
1126 return manager_->CanEnterFullscreen(frame_); 1127 return manager_->CanEnterFullscreen(frame_);
1127 } 1128 }
1128 1129
1129 } // namespace webkit_media 1130 } // namespace webkit_media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698