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

Side by Side Diff: chrome/renderer/media/chrome_key_systems.cc

Issue 2095963004: Revert of media: Add OutputProtectionProxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | media/cdm/ppapi/external_clear_key/clear_key_cdm.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 "chrome/renderer/media/chrome_key_systems.h" 5 #include "chrome/renderer/media/chrome_key_systems.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 127
128 // External Clear Key (used for testing). 128 // External Clear Key (used for testing).
129 static void AddExternalClearKey( 129 static void AddExternalClearKey(
130 std::vector<std::unique_ptr<KeySystemProperties>>* concrete_key_systems) { 130 std::vector<std::unique_ptr<KeySystemProperties>>* concrete_key_systems) {
131 static const char kExternalClearKeyKeySystem[] = 131 static const char kExternalClearKeyKeySystem[] =
132 "org.chromium.externalclearkey"; 132 "org.chromium.externalclearkey";
133 static const char kExternalClearKeyDecryptOnlyKeySystem[] = 133 static const char kExternalClearKeyDecryptOnlyKeySystem[] =
134 "org.chromium.externalclearkey.decryptonly"; 134 "org.chromium.externalclearkey.decryptonly";
135 static const char kExternalClearKeyFileIOTestKeySystem[] = 135 static const char kExternalClearKeyFileIOTestKeySystem[] =
136 "org.chromium.externalclearkey.fileiotest"; 136 "org.chromium.externalclearkey.fileiotest";
137 static const char kExternalClearKeyOutputProtectionTestKeySystem[] =
138 "org.chromium.externalclearkey.outputprotectiontest";
139 static const char kExternalClearKeyInitializeFailKeySystem[] = 137 static const char kExternalClearKeyInitializeFailKeySystem[] =
140 "org.chromium.externalclearkey.initializefail"; 138 "org.chromium.externalclearkey.initializefail";
141 static const char kExternalClearKeyCrashKeySystem[] = 139 static const char kExternalClearKeyCrashKeySystem[] =
142 "org.chromium.externalclearkey.crash"; 140 "org.chromium.externalclearkey.crash";
143 141
144 std::vector<base::string16> additional_param_names; 142 std::vector<base::string16> additional_param_names;
145 std::vector<base::string16> additional_param_values; 143 std::vector<base::string16> additional_param_values;
146 if (!IsPepperCdmAvailable(kExternalClearKeyPepperType, 144 if (!IsPepperCdmAvailable(kExternalClearKeyPepperType,
147 &additional_param_names, 145 &additional_param_names,
148 &additional_param_values)) { 146 &additional_param_values)) {
149 return; 147 return;
150 } 148 }
151 149
152 concrete_key_systems->emplace_back( 150 concrete_key_systems->emplace_back(
153 new ExternalClearKeyProperties(kExternalClearKeyKeySystem)); 151 new ExternalClearKeyProperties(kExternalClearKeyKeySystem));
154 152
155 // Add support of decrypt-only mode in ClearKeyCdm. 153 // Add support of decrypt-only mode in ClearKeyCdm.
156 concrete_key_systems->emplace_back( 154 concrete_key_systems->emplace_back(
157 new ExternalClearKeyProperties(kExternalClearKeyDecryptOnlyKeySystem)); 155 new ExternalClearKeyProperties(kExternalClearKeyDecryptOnlyKeySystem));
158 156
159 // A key system that triggers the FileIO test in ClearKeyCdm. 157 // A key system that triggers FileIO test in ClearKeyCdm.
160 concrete_key_systems->emplace_back( 158 concrete_key_systems->emplace_back(
161 new ExternalClearKeyProperties(kExternalClearKeyFileIOTestKeySystem)); 159 new ExternalClearKeyProperties(kExternalClearKeyFileIOTestKeySystem));
162 160
163 // A key system that triggers the output protection test in ClearKeyCdm.
164 concrete_key_systems->emplace_back(new ExternalClearKeyProperties(
165 kExternalClearKeyOutputProtectionTestKeySystem));
166
167 // A key system that Chrome thinks is supported by ClearKeyCdm, but actually 161 // A key system that Chrome thinks is supported by ClearKeyCdm, but actually
168 // will be refused by ClearKeyCdm. This is to test the CDM initialization 162 // will be refused by ClearKeyCdm. This is to test the CDM initialization
169 // failure case. 163 // failure case.
170 concrete_key_systems->emplace_back( 164 concrete_key_systems->emplace_back(
171 new ExternalClearKeyProperties(kExternalClearKeyInitializeFailKeySystem)); 165 new ExternalClearKeyProperties(kExternalClearKeyInitializeFailKeySystem));
172 166
173 // A key system that triggers a crash in ClearKeyCdm. 167 // A key system that triggers a crash in ClearKeyCdm.
174 concrete_key_systems->emplace_back( 168 concrete_key_systems->emplace_back(
175 new ExternalClearKeyProperties(kExternalClearKeyCrashKeySystem)); 169 new ExternalClearKeyProperties(kExternalClearKeyCrashKeySystem));
176 } 170 }
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 #if defined(WIDEVINE_CDM_AVAILABLE) 278 #if defined(WIDEVINE_CDM_AVAILABLE)
285 AddPepperBasedWidevine(key_systems_properties); 279 AddPepperBasedWidevine(key_systems_properties);
286 #endif // defined(WIDEVINE_CDM_AVAILABLE) 280 #endif // defined(WIDEVINE_CDM_AVAILABLE)
287 281
288 #endif // defined(ENABLE_PEPPER_CDMS) 282 #endif // defined(ENABLE_PEPPER_CDMS)
289 283
290 #if defined(OS_ANDROID) 284 #if defined(OS_ANDROID)
291 cdm::AddAndroidWidevine(key_systems_properties); 285 cdm::AddAndroidWidevine(key_systems_properties);
292 #endif // defined(OS_ANDROID) 286 #endif // defined(OS_ANDROID)
293 } 287 }
OLDNEW
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | media/cdm/ppapi/external_clear_key/clear_key_cdm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698