diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-08-01 12:59:39 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2016-08-04 12:40:43 +0000 |
commit | 28b1110370900897ab652cb420c371fab8857ad4 (patch) | |
tree | 41b32127d23b0df4f2add2a27e12dc87bddb260e /chromium/third_party/widevine | |
parent | 399c965b6064c440ddcf4015f5f8e9d131c7a0a6 (diff) | |
download | qtwebengine-chromium-28b1110370900897ab652cb420c371fab8857ad4.tar.gz |
BASELINE: Update Chromium to 53.0.2785.41
Also adds a few extra files for extensions.
Change-Id: Iccdd55d98660903331cf8b7b29188da781830af4
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/third_party/widevine')
-rw-r--r-- | chromium/third_party/widevine/cdm/BUILD.gn | 40 | ||||
-rw-r--r-- | chromium/third_party/widevine/cdm/widevine_cdm.gyp | 124 | ||||
-rw-r--r-- | chromium/third_party/widevine/cdm/widevine_cdm_common.h | 14 |
3 files changed, 135 insertions, 43 deletions
diff --git a/chromium/third_party/widevine/cdm/BUILD.gn b/chromium/third_party/widevine/cdm/BUILD.gn index e2093a58849..e5fdb29e858 100644 --- a/chromium/third_party/widevine/cdm/BUILD.gn +++ b/chromium/third_party/widevine/cdm/BUILD.gn @@ -5,6 +5,7 @@ import("//build/config/chrome_build.gni") import("//build/config/features.gni") import("//chrome/version.gni") # TODO layering violation +import("//media/cdm/ppapi/cdm_paths.gni") import("//media/cdm/ppapi/ppapi_cdm_adapter.gni") import("//third_party/widevine/cdm/widevine.gni") @@ -13,10 +14,12 @@ if (widevine_arch == "x86") { widevine_arch = "ia32" } +widevine_cdm_binary_files = [] +widevine_cdm_manifest_file = [] + if (is_android) { # Always available on Android regardless of branding. widevine_cdm_version_h_file = "android/widevine_cdm_version.h" - widevine_cdm_binary_files = [] } else if (is_chrome_branded) { if (is_chromeos) { widevine_cdm_version_h_file = @@ -31,21 +34,20 @@ if (is_android) { "win/$widevine_arch/widevinecdm.dll", "win/$widevine_arch/widevinecdm.dll.lib", ] + widevine_cdm_manifest_file = [ "win/$widevine_arch/manifest.json" ] } else if (is_mac) { widevine_cdm_version_h_file = "mac/$widevine_arch/widevine_cdm_version.h" widevine_cdm_binary_files = [ "mac/$widevine_arch/libwidevinecdm.dylib" ] + widevine_cdm_manifest_file = [ "mac/$widevine_arch/manifest.json" ] } else { # Other platforms, use the default one. widevine_cdm_version_h_file = "widevine_cdm_version.h" - widevine_cdm_binary_files = [] } } else if (enable_widevine) { widevine_cdm_version_h_file = "stub/widevine_cdm_version.h" - widevine_cdm_binary_files = [] } else { # No branding, use the default one. widevine_cdm_version_h_file = "widevine_cdm_version.h" - widevine_cdm_binary_files = [] } # GYP version: third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h @@ -67,7 +69,7 @@ if (widevine_cdm_binary_files != []) { copy("widevinecdm") { sources = widevine_cdm_binary_files outputs = [ - "$root_out_dir/{{source_file_part}}", + "$root_out_dir/$widevine_cdm_path/{{source_file_part}}", ] # TODO(jrummell) @@ -77,6 +79,7 @@ if (widevine_cdm_binary_files != []) { assert(!is_chrome_branded, "Branded Chrome should have binary files to copy.") assert(!is_android, "Android should not have enable_pepper_cdms.") shared_library("widevinecdm") { + output_dir = "$root_out_dir/$widevine_cdm_path" sources = [ "//media/cdm/stub/stub_cdm.cc", "//media/cdm/stub/stub_cdm.h", @@ -110,6 +113,19 @@ if (widevine_cdm_binary_files != []) { } } +if (widevine_cdm_manifest_file != []) { + copy("widevine_cdm_manifest") { + sources = widevine_cdm_manifest_file + outputs = [ + "$root_out_dir/WidevineCdm/{{source_file_part}}", + ] + } +} else { + group("widevine_cdm_manifest") { + # NOP + } +} + if ((is_chrome_branded || enable_widevine) && enable_pepper_cdms) { # Produce and compile the .rc file. process_version("widevinecdmadapter_resources") { @@ -124,21 +140,29 @@ if ((is_chrome_branded || enable_widevine) && enable_pepper_cdms) { ppapi_cdm_adapter("widevinecdmadapter") { defines = [] + output_dir = "$root_out_dir/$widevine_cdm_path" deps = [ ":version_h", ":widevinecdm", ":widevinecdmadapter_resources", ] + data_deps = [ + ":widevine_cdm_manifest", + ":widevinecdm", + ] if (is_linux) { ldflags = - [ rebase_path("$root_out_dir/libwidevinecdm.so", root_build_dir) ] + [ rebase_path("$root_out_dir/$widevine_cdm_path/libwidevinecdm.so", + root_build_dir) ] } else if (is_win) { ldflags = - [ rebase_path("$root_out_dir/widevinecdm.dll.lib", root_build_dir) ] + [ rebase_path("$root_out_dir/$widevine_cdm_path/widevinecdm.dll.lib", + root_build_dir) ] } else if (is_mac) { ldflags = - [ rebase_path("$root_out_dir/libwidevinecdm.dylib", root_build_dir) ] + [ rebase_path("$root_out_dir/$widevine_cdm_path/libwidevinecdm.dylib", + root_build_dir) ] } } } else { diff --git a/chromium/third_party/widevine/cdm/widevine_cdm.gyp b/chromium/third_party/widevine/cdm/widevine_cdm.gyp index 97a416518bf..a1c27a71e52 100644 --- a/chromium/third_party/widevine/cdm/widevine_cdm.gyp +++ b/chromium/third_party/widevine/cdm/widevine_cdm.gyp @@ -11,6 +11,7 @@ 'enable_widevine%': '<(enable_widevine)', 'widevine_cdm_version_h_file%': 'widevine_cdm_version.h', 'widevine_cdm_binary_files%': [], + 'widevine_cdm_manifest_file%': [], 'conditions': [ [ 'branding == "Chrome"', { 'conditions': [ @@ -34,6 +35,9 @@ 'widevine_cdm_binary_files%': [ 'mac/<(target_arch)/libwidevinecdm.dylib', ], + 'widevine_cdm_manifest_file%': [ + 'mac/<(target_arch)/manifest.json', + ], }], [ 'OS == "win"', { 'widevine_cdm_version_h_file%': @@ -42,6 +46,9 @@ 'win/<(target_arch)/widevinecdm.dll', 'win/<(target_arch)/widevinecdm.dll.lib', ], + 'widevine_cdm_manifest_file%': [ + 'win/<(target_arch)/manifest.json', + ], }], ], }], @@ -60,8 +67,8 @@ }, 'includes': [ '../../../build/util/version.gypi', + '../../../media/cdm_paths.gypi', ], - # Always provide a target, so we can put the logic about whether there's # anything to be done in this file (instead of a higher-level .gyp file). 'targets': [ @@ -84,8 +91,8 @@ ], }, { - # GN version: //third_party/widevine/cdm:widevinecdmadapter - 'target_name': 'widevinecdmadapter', + 'target_name': 'widevinecdmadapter_binary', + 'product_name': 'widevinecdmadapter', 'type': 'none', 'conditions': [ [ '(branding == "Chrome" or enable_widevine == 1) and enable_pepper_cdms == 1', { @@ -93,6 +100,7 @@ '<(DEPTH)/ppapi/ppapi.gyp:ppapi_cpp', '<(DEPTH)/media/media_cdm_adapter.gyp:cdmadapter', 'widevine_cdm_version_h', + 'widevine_cdm_manifest', 'widevinecdm', 'widevinecdmadapter_resources', ], @@ -104,26 +112,51 @@ 'libraries': [ '-lrt', # Copied/created by widevinecdm. - '<(PRODUCT_DIR)/libwidevinecdm.so', + '<(PRODUCT_DIR)/<(widevine_cdm_path)/libwidevinecdm.so', ], }], [ 'OS == "win"', { 'libraries': [ # Copied/created by widevinecdm. - '<(PRODUCT_DIR)/widevinecdm.dll.lib', + '<(PRODUCT_DIR)/<(widevine_cdm_path)/widevinecdm.dll.lib', ], }], [ 'OS == "mac"', { 'libraries': [ # Copied/created by widevinecdm. - '<(PRODUCT_DIR)/libwidevinecdm.dylib', + '<(PRODUCT_DIR)/<(widevine_cdm_path)/libwidevinecdm.dylib', ], + }, { + # Put Widevine CDM adapter to the correct path directly except + # for mac. On mac strip_save_dsym doesn't work with product_dir + # so we rely on "widevinecdmadapter" target to copy it over. + # See http://crbug.com/611990 + 'product_dir': '<(PRODUCT_DIR)/<(widevine_cdm_path)', }], ], }], ], }, { + # GN version: //third_party/widevine/cdm:widevinecdmadapter + # On Mac this copies the widevinecdmadapter binary to + # <(widevine_cdm_path). On all other platforms the binary is already + # in <(widevine_cdm_path). See "product_dir" above. + 'target_name': 'widevinecdmadapter', + 'type': 'none', + 'dependencies': [ + 'widevinecdmadapter_binary', + ], + 'conditions': [ + [ '(branding == "Chrome" or enable_widevine == 1) and enable_pepper_cdms == 1 and OS == "mac"', { + 'copies': [{ + 'destination': '<(PRODUCT_DIR)/<(widevine_cdm_path)', + 'files': [ '<(PRODUCT_DIR)/widevinecdmadapter.plugin' ], + }], + }], + ], + }, + { # GN version: //third_party/widevine/cdm:version_h 'target_name': 'widevine_cdm_version_h', 'type': 'none', @@ -133,6 +166,19 @@ }], }, { + # GN version: //third_party/widevine/cdm:widevine_cdm_manifest + 'target_name': 'widevine_cdm_manifest', + 'type': 'none', + 'conditions': [ + [ 'widevine_cdm_manifest_file != []', { + 'copies': [{ + 'destination': '<(PRODUCT_DIR)/WidevineCdm', + 'files': [ '<(widevine_cdm_manifest_file)' ], + }], + }], + ], + }, + { # GN version: //third_party/widevine/cdm:widevinecdm 'target_name': 'widevinecdm', 'type': 'none', @@ -146,19 +192,51 @@ }], ], 'copies': [{ - # TODO(ddorwin): Do we need a sub-directory? We either need a - # sub-directory or to rename manifest.json before we can copy it. - 'destination': '<(PRODUCT_DIR)', + 'destination': '<(PRODUCT_DIR)/<(widevine_cdm_path)', 'files': [ '<@(widevine_cdm_binary_files)' ], }], }], [ 'branding != "Chrome" and enable_widevine == 1', { + # On Mac this copies the widevinecdm binary to <(widevine_cdm_path). + # On other platforms the binary is already in <(widevine_cdm_path). + # See "widevinecdm_binary". + 'dependencies': [ + 'widevinecdm_binary', + ], + 'conditions': [ + ['OS == "mac"', { + 'copies': [{ + 'destination': '<(PRODUCT_DIR)/<(widevine_cdm_path)', + 'files': [ '<(PRODUCT_DIR)/libwidevinecdm.dylib' ], + }], + }], + ], + }], + ], + }, + { + # GN version: //third_party/widevine/cdm:widevine_test_license_server + 'target_name': 'widevine_test_license_server', + 'type': 'none', + 'conditions': [ + [ 'branding == "Chrome" and OS == "linux"', { + 'dependencies': [ + '<(DEPTH)/third_party/widevine/test/license_server/license_server.gyp:test_license_server', + ], + }], + ], + }, + ], + 'conditions': [ + [ 'branding != "Chrome" and enable_widevine == 1', { + 'targets': [ + { + 'target_name': 'widevinecdm_binary', + 'product_name': 'widevinecdm', + 'type': 'none', 'conditions': [ ['os_posix == 1 and OS != "mac"', { 'type': 'loadable_module', - # Note that this causes the binary to be put in PRODUCT_DIR - # instead of lib/. This matches what happens in the copy step - # above. }], ['OS == "mac" or OS == "win"', { 'type': 'shared_library', @@ -167,6 +245,12 @@ 'xcode_settings': { 'DYLIB_INSTALL_NAME_BASE': '@loader_path', }, + }, { + # Put Widevine CDM in the correct path directly except + # for mac. On mac strip_save_dsym doesn't work with product_dir + # so we rely on the "widevinecdm" target to copy it over. + # See http://crbug.com/611990 + 'product_dir': '<(PRODUCT_DIR)/<(widevine_cdm_path)', }], ], 'defines': ['CDM_IMPLEMENTATION'], @@ -178,20 +262,8 @@ '<(DEPTH)/media/cdm/stub/stub_cdm.cc', '<(DEPTH)/media/cdm/stub/stub_cdm.h', ], - }], + }, ], - }, - { - # GN version: //third_party/widevine/cdm:widevine_test_license_server - 'target_name': 'widevine_test_license_server', - 'type': 'none', - 'conditions': [ - [ 'branding == "Chrome" and OS == "linux"', { - 'dependencies': [ - '<(DEPTH)/third_party/widevine/test/license_server/license_server.gyp:test_license_server', - ], - }], - ], - }, + }], ], } diff --git a/chromium/third_party/widevine/cdm/widevine_cdm_common.h b/chromium/third_party/widevine/cdm/widevine_cdm_common.h index b5e51939fa8..e0344947278 100644 --- a/chromium/third_party/widevine/cdm/widevine_cdm_common.h +++ b/chromium/third_party/widevine/cdm/widevine_cdm_common.h @@ -16,6 +16,9 @@ const char kWidevineKeySystem[] = "com.widevine.alpha"; // This type is used to register the Widevine CDM. const char kWidevineCdmType[] = "Widevine"; +// Widevine CDM files are in a directory with this name. +const char kWidevineCdmBaseDirectory[] = "WidevineCdm"; + // This name is used by UMA. Do not change it! const char kWidevineKeySystemNameForUMA[] = "Widevine"; @@ -30,15 +33,8 @@ const char kWidevineCdmPluginMimeType[] = "application/x-ppapi-widevine-cdm"; const char kWidevineCdmPluginMimeTypeDescription[] = "Widevine Content Decryption Module"; -// File name of the CDM on different platforms. -const char kWidevineCdmFileName[] = -#if defined(OS_MACOSX) - "libwidevinecdm.dylib"; -#elif defined(OS_WIN) - "widevinecdm.dll"; -#else // OS_LINUX, etc. - "libwidevinecdm.so"; -#endif +// Name of the CDM library. +const char kWidevineCdmLibraryName[] = "widevinecdm"; // File name of the adapter on different platforms. const char kWidevineCdmAdapterFileName[] = |