OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/common/chrome_content_client.h" | 5 #include "chrome/common/chrome_content_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/cpu.h" | 8 #include "base/cpu.h" |
9 #include "base/debug/crash_logging.h" | 9 #include "base/debug/crash_logging.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
12 #include "base/strings/string16.h" | |
12 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
13 #include "base/strings/string_split.h" | 14 #include "base/strings/string_split.h" |
14 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
15 #include "base/strings/stringprintf.h" | 16 #include "base/strings/stringprintf.h" |
16 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
17 #include "build/build_config.h" | 18 #include "build/build_config.h" |
18 #include "chrome/common/child_process_logging.h" | 19 #include "chrome/common/child_process_logging.h" |
19 #include "chrome/common/chrome_paths.h" | 20 #include "chrome/common/chrome_paths.h" |
20 #include "chrome/common/chrome_switches.h" | 21 #include "chrome/common/chrome_switches.h" |
21 #include "chrome/common/chrome_version_info.h" | 22 #include "chrome/common/chrome_version_info.h" |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
282 content::PepperPluginInfo widevine_cdm; | 283 content::PepperPluginInfo widevine_cdm; |
283 widevine_cdm.is_out_of_process = true; | 284 widevine_cdm.is_out_of_process = true; |
284 widevine_cdm.path = path; | 285 widevine_cdm.path = path; |
285 widevine_cdm.name = kWidevineCdmDisplayName; | 286 widevine_cdm.name = kWidevineCdmDisplayName; |
286 widevine_cdm.description = kWidevineCdmDescription; | 287 widevine_cdm.description = kWidevineCdmDescription; |
287 widevine_cdm.version = WIDEVINE_CDM_VERSION_STRING; | 288 widevine_cdm.version = WIDEVINE_CDM_VERSION_STRING; |
288 content::WebPluginMimeType widevine_cdm_mime_type( | 289 content::WebPluginMimeType widevine_cdm_mime_type( |
289 kWidevineCdmPluginMimeType, | 290 kWidevineCdmPluginMimeType, |
290 kWidevineCdmPluginExtension, | 291 kWidevineCdmPluginExtension, |
291 kWidevineCdmPluginMimeTypeDescription); | 292 kWidevineCdmPluginMimeTypeDescription); |
293 | |
294 // Add the supported codecs as if they came from the component manifest. | |
295 base::string16 codecs = base::ASCIIToUTF16(kCdmSupportedCodecVorbis) + | |
296 base::ASCIIToUTF16(",") + | |
xhwang
2013/10/25 17:33:22
do we have comments anywhere about the format? e.g
ddorwin
2013/10/25 19:03:40
Done. Added constant and simplified this.
| |
297 base::ASCIIToUTF16(kCdmSupportedCodecVp8); | |
298 #if defined(USE_PROPRIETARY_CODECS) | |
299 #if defined(WIDEVINE_CDM_AAC_SUPPORT_AVAILABLE) | |
300 codecs += (base::ASCIIToUTF16(",") + | |
301 base::ASCIIToUTF16(kCdmSupportedCodecAac)); | |
302 #endif | |
303 #if defined(WIDEVINE_CDM_AVC1_SUPPORT_AVAILABLE) | |
xhwang
2013/10/25 17:33:22
Per offline discussion, add a TODO about renaming
ddorwin
2013/10/25 19:03:40
Done.
| |
304 codecs += (base::ASCIIToUTF16(",") + | |
305 base::ASCIIToUTF16(kCdmSupportedCodecAvc1)); | |
306 #endif | |
307 #endif // defined(USE_PROPRIETARY_CODECS) | |
308 widevine_cdm_mime_type.additional_param_names.push_back( | |
309 base::ASCIIToUTF16(kCdmSupportedCodecsParamName)); | |
310 widevine_cdm_mime_type.additional_param_values.push_back(codecs); | |
311 | |
292 widevine_cdm.mime_types.push_back(widevine_cdm_mime_type); | 312 widevine_cdm.mime_types.push_back(widevine_cdm_mime_type); |
293 widevine_cdm.permissions = kWidevineCdmPluginPermissions; | 313 widevine_cdm.permissions = kWidevineCdmPluginPermissions; |
294 plugins->push_back(widevine_cdm); | 314 plugins->push_back(widevine_cdm); |
295 | 315 |
296 skip_widevine_cdm_file_check = true; | 316 skip_widevine_cdm_file_check = true; |
297 } | 317 } |
298 } | 318 } |
299 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) && | 319 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) && |
300 // !defined(WIDEVINE_CDM_IS_COMPONENT) | 320 // !defined(WIDEVINE_CDM_IS_COMPONENT) |
301 | 321 |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
534 } | 554 } |
535 return false; | 555 return false; |
536 } | 556 } |
537 | 557 |
538 std::string ChromeContentClient::GetCarbonInterposePath() const { | 558 std::string ChromeContentClient::GetCarbonInterposePath() const { |
539 return std::string(kInterposeLibraryPath); | 559 return std::string(kInterposeLibraryPath); |
540 } | 560 } |
541 #endif | 561 #endif |
542 | 562 |
543 } // namespace chrome | 563 } // namespace chrome |
OLD | NEW |