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

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: pass array 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
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 667 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

Powered by Google App Engine
This is Rietveld 408576698