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

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

Issue 557723003: Implement Chromium side of MediaKeys.isTypeSupported(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add DEP from components/cdm/renderer to content/public/common. Created 6 years, 3 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 "chrome/renderer/media/chrome_key_systems.h" 5 #include "chrome/renderer/media/chrome_key_systems.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
12 #include "base/strings/string_split.h" 12 #include "base/strings/string_split.h"
13 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
14 #include "chrome/common/render_messages.h" 14 #include "chrome/common/render_messages.h"
15 #include "components/cdm/renderer/widevine_key_systems.h" 15 #include "components/cdm/renderer/widevine_key_systems.h"
16 #include "content/public/common/eme_codec.h"
17 #include "content/public/common/eme_init_data_type.h"
ddorwin 2014/09/13 01:20:44 Does it make sense to unify these? eme_constants.h
sandersd (OOO until July 31) 2014/09/22 23:45:52 Done.
16 #include "content/public/renderer/render_thread.h" 18 #include "content/public/renderer/render_thread.h"
17 19
18 #if defined(OS_ANDROID) 20 #if defined(OS_ANDROID)
19 #include "components/cdm/renderer/android_key_systems.h" 21 #include "components/cdm/renderer/android_key_systems.h"
20 #endif 22 #endif
21 23
22 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. 24 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
23 25
24 // The following must be after widevine_cdm_version.h. 26 // The following must be after widevine_cdm_version.h.
25 27
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 return; 73 return;
72 } 74 }
73 75
74 KeySystemInfo info(kExternalClearKeyKeySystem); 76 KeySystemInfo info(kExternalClearKeyKeySystem);
75 77
76 info.supported_codecs = content::EME_CODEC_WEBM_ALL; 78 info.supported_codecs = content::EME_CODEC_WEBM_ALL;
77 #if defined(USE_PROPRIETARY_CODECS) 79 #if defined(USE_PROPRIETARY_CODECS)
78 info.supported_codecs |= content::EME_CODEC_MP4_ALL; 80 info.supported_codecs |= content::EME_CODEC_MP4_ALL;
79 #endif // defined(USE_PROPRIETARY_CODECS) 81 #endif // defined(USE_PROPRIETARY_CODECS)
80 82
83 info.supported_init_data_types = content::EME_INIT_DATA_TYPE_ALL;
ddorwin 2014/09/13 01:20:44 We don't currently support keyids. How should we h
sandersd (OOO until July 31) 2014/09/22 23:45:52 Done.
84
81 info.pepper_type = kExternalClearKeyPepperType; 85 info.pepper_type = kExternalClearKeyPepperType;
82 86
83 concrete_key_systems->push_back(info); 87 concrete_key_systems->push_back(info);
84 88
85 // Add support of decrypt-only mode in ClearKeyCdm. 89 // Add support of decrypt-only mode in ClearKeyCdm.
86 info.key_system = kExternalClearKeyDecryptOnlyKeySystem; 90 info.key_system = kExternalClearKeyDecryptOnlyKeySystem;
87 concrete_key_systems->push_back(info); 91 concrete_key_systems->push_back(info);
88 92
89 // A key system that triggers FileIO test in ClearKeyCdm. 93 // A key system that triggers FileIO test in ClearKeyCdm.
90 info.key_system = kExternalClearKeyFileIOTestKeySystem; 94 info.key_system = kExternalClearKeyFileIOTestKeySystem;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 186
183 #if defined(WIDEVINE_CDM_AVAILABLE) 187 #if defined(WIDEVINE_CDM_AVAILABLE)
184 AddPepperBasedWidevine(key_systems_info); 188 AddPepperBasedWidevine(key_systems_info);
185 #endif // defined(WIDEVINE_CDM_AVAILABLE) 189 #endif // defined(WIDEVINE_CDM_AVAILABLE)
186 #endif // defined(ENABLE_PEPPER_CDMS) 190 #endif // defined(ENABLE_PEPPER_CDMS)
187 191
188 #if defined(OS_ANDROID) 192 #if defined(OS_ANDROID)
189 cdm::AddAndroidWidevine(key_systems_info); 193 cdm::AddAndroidWidevine(key_systems_info);
190 #endif // defined(OS_ANDROID) 194 #endif // defined(OS_ANDROID)
191 } 195 }
OLDNEW
« no previous file with comments | « no previous file | components/cdm/renderer/DEPS » ('j') | components/cdm/renderer/android_key_systems.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698