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

Side by Side Diff: webkit/media/crypto/ppapi/clear_key_cdm.cc

Issue 15772012: Separate MediaKeys interface from Decryptor interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android 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 | Annotate | Revision Log
« no previous file with comments | « webkit/media/crypto/ppapi/clear_key_cdm.h ('k') | webkit/media/crypto/ppapi_decryptor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/crypto/ppapi/clear_key_cdm.h" 5 #include "webkit/media/crypto/ppapi/clear_key_cdm.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <sstream> 8 #include <sstream>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 } 161 }
162 162
163 void ClearKeyCdm::Client::KeyAdded(const std::string& key_system, 163 void ClearKeyCdm::Client::KeyAdded(const std::string& key_system,
164 const std::string& session_id) { 164 const std::string& session_id) {
165 status_ = kKeyAdded; 165 status_ = kKeyAdded;
166 session_id_ = session_id; 166 session_id_ = session_id;
167 } 167 }
168 168
169 void ClearKeyCdm::Client::KeyError(const std::string& key_system, 169 void ClearKeyCdm::Client::KeyError(const std::string& key_system,
170 const std::string& session_id, 170 const std::string& session_id,
171 media::Decryptor::KeyError error_code, 171 media::MediaKeys::KeyError error_code,
172 int system_code) { 172 int system_code) {
173 status_ = kKeyError; 173 status_ = kKeyError;
174 session_id_ = session_id; 174 session_id_ = session_id;
175 } 175 }
176 176
177 void ClearKeyCdm::Client::KeyMessage(const std::string& key_system, 177 void ClearKeyCdm::Client::KeyMessage(const std::string& key_system,
178 const std::string& session_id, 178 const std::string& session_id,
179 const std::string& message, 179 const std::string& message,
180 const std::string& default_url) { 180 const std::string& default_url) {
181 status_ = kKeyMessage; 181 status_ = kKeyMessage;
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 int samples_generated = GenerateFakeAudioFramesFromDuration( 569 int samples_generated = GenerateFakeAudioFramesFromDuration(
570 timestamp_in_microseconds - CurrentTimeStampInMicroseconds(), 570 timestamp_in_microseconds - CurrentTimeStampInMicroseconds(),
571 audio_frames); 571 audio_frames);
572 total_samples_generated_ += samples_generated; 572 total_samples_generated_ += samples_generated;
573 573
574 return samples_generated == 0 ? cdm::kNeedMoreData : cdm::kSuccess; 574 return samples_generated == 0 ? cdm::kNeedMoreData : cdm::kSuccess;
575 } 575 }
576 #endif // CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER 576 #endif // CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER
577 577
578 } // namespace webkit_media 578 } // namespace webkit_media
OLDNEW
« no previous file with comments | « webkit/media/crypto/ppapi/clear_key_cdm.h ('k') | webkit/media/crypto/ppapi_decryptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698