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

Side by Side Diff: media/cdm/ppapi/external_clear_key/clear_key_cdm.cc

Issue 811923002: Changes to support CDM_7 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cdm_7 changes Created 6 years 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 "media/cdm/ppapi/external_clear_key/clear_key_cdm.h" 5 #include "media/cdm/ppapi/external_clear_key/clear_key_cdm.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstring> 8 #include <cstring>
9 #include <sstream> 9 #include <sstream>
10 #include <string> 10 #include <string>
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 case media::MediaKeys::OUTPUT_ERROR: 149 case media::MediaKeys::OUTPUT_ERROR:
150 return cdm::kOutputError; 150 return cdm::kOutputError;
151 } 151 }
152 NOTIMPLEMENTED(); 152 NOTIMPLEMENTED();
153 return cdm::kUnknownError; 153 return cdm::kUnknownError;
154 } 154 }
155 155
156 static media::MediaKeys::SessionType ConvertSessionType( 156 static media::MediaKeys::SessionType ConvertSessionType(
157 cdm::SessionType session_type) { 157 cdm::SessionType session_type) {
158 switch (session_type) { 158 switch (session_type) {
159 case cdm::kPersistent:
160 return media::MediaKeys::PERSISTENT_SESSION;
161 case cdm::kTemporary: 159 case cdm::kTemporary:
162 return media::MediaKeys::TEMPORARY_SESSION; 160 return media::MediaKeys::TEMPORARY_SESSION;
161 case cdm::kPersistentLicense:
162 return media::MediaKeys::PERSISTENT_SESSION;
163 case cdm::kPersistentKeyRelease:
164 // TODO(jrummell): Return matching type when MediaKeys changes.
165 return media::MediaKeys::PERSISTENT_SESSION;
163 } 166 }
164 NOTIMPLEMENTED(); 167 NOTIMPLEMENTED();
165 return media::MediaKeys::TEMPORARY_SESSION; 168 return media::MediaKeys::TEMPORARY_SESSION;
166 } 169 }
167 170
168 template<typename Type> 171 template<typename Type>
169 class ScopedResetter { 172 class ScopedResetter {
170 public: 173 public:
171 explicit ScopedResetter(Type* object) : object_(object) {} 174 explicit ScopedResetter(Type* object) : object_(object) {}
172 ~ScopedResetter() { object_->Reset(); } 175 ~ScopedResetter() { object_->Reset(); }
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 host_->OnSessionMessage(last_session_id_.data(), 861 host_->OnSessionMessage(last_session_id_.data(),
859 last_session_id_.length(), 862 last_session_id_.length(),
860 message.data(), 863 message.data(),
861 message.length(), 864 message.length(),
862 NULL, 865 NULL,
863 0); 866 0);
864 file_io_test_runner_.reset(); 867 file_io_test_runner_.reset();
865 } 868 }
866 869
867 } // namespace media 870 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698