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

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: CrOS compile error Created 5 years, 11 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 | « media/cdm/ppapi/cdm_wrapper.h ('k') | media/cdm/ppapi/supported_cdm_versions.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 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 case media::MediaKeys::OUTPUT_ERROR: 150 case media::MediaKeys::OUTPUT_ERROR:
151 return cdm::kOutputError; 151 return cdm::kOutputError;
152 } 152 }
153 NOTIMPLEMENTED(); 153 NOTIMPLEMENTED();
154 return cdm::kUnknownError; 154 return cdm::kUnknownError;
155 } 155 }
156 156
157 static media::MediaKeys::SessionType ConvertSessionType( 157 static media::MediaKeys::SessionType ConvertSessionType(
158 cdm::SessionType session_type) { 158 cdm::SessionType session_type) {
159 switch (session_type) { 159 switch (session_type) {
160 case cdm::kPersistent:
161 return media::MediaKeys::PERSISTENT_SESSION;
162 case cdm::kTemporary: 160 case cdm::kTemporary:
163 return media::MediaKeys::TEMPORARY_SESSION; 161 return media::MediaKeys::TEMPORARY_SESSION;
162 case cdm::kPersistentLicense:
163 return media::MediaKeys::PERSISTENT_SESSION;
164 case cdm::kPersistentKeyRelease:
165 // TODO(jrummell): Return matching type when MediaKeys changes.
166 return media::MediaKeys::PERSISTENT_SESSION;
164 } 167 }
165 NOTIMPLEMENTED(); 168 NOTIMPLEMENTED();
166 return media::MediaKeys::TEMPORARY_SESSION; 169 return media::MediaKeys::TEMPORARY_SESSION;
167 } 170 }
168 171
169 template<typename Type> 172 template<typename Type>
170 class ScopedResetter { 173 class ScopedResetter {
171 public: 174 public:
172 explicit ScopedResetter(Type* object) : object_(object) {} 175 explicit ScopedResetter(Type* object) : object_(object) {}
173 ~ScopedResetter() { object_->Reset(); } 176 ~ScopedResetter() { object_->Reset(); }
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 host_->OnSessionMessage(last_session_id_.data(), 843 host_->OnSessionMessage(last_session_id_.data(),
841 last_session_id_.length(), 844 last_session_id_.length(),
842 message.data(), 845 message.data(),
843 message.length(), 846 message.length(),
844 NULL, 847 NULL,
845 0); 848 0);
846 file_io_test_runner_.reset(); 849 file_io_test_runner_.reset();
847 } 850 }
848 851
849 } // namespace media 852 } // namespace media
OLDNEW
« no previous file with comments | « media/cdm/ppapi/cdm_wrapper.h ('k') | media/cdm/ppapi/supported_cdm_versions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698