(reland) media: Use platform specific folders for CDMs
This is a reland of commit e13213d846ff7bdd794588b7efd152c3b5080a8d with a minor fix in media_cdm.gypi where we use product_dir for clearkeycdm on all platforms except for Mac. On Mac, we use the default product_dir, and then copy the library to the platform specific folder.
Original CL Description:
* Purpose of this CL:
To support bundled CDM using DefaultCompnentInstaller, the folder structure of bundled CDMs should be the same as component updated CDMs.
For component CDMs, the folder structure is like:
<DIR_USER_DATA>/WidevineCdm/<version>/_platform_specific/win_x64
For bundled CDM, the folder structure should be like:
<DIR_COMPONENTS>/WidevineCdm/_platform_specific/win_x64
Note that the <version> folder is not needed in this case.
* What this CL does:
- Introduce cdm_paths.* to put CDMs in platform specific folders. On Win/Mac, we have something like WidevineCdm/_platform_specific/win_x64. On Linux/Cros, we don't use platform specific folders.
- On Mac, strip_save_dsym doesn't work with targets with "product_dir" (in gyp build). So we build to the default output dir first, then copy it over to the platform specific folder. See http://crbug.com/611990 for more details.
- Updated all tests to support platform specific folders.
- Update installer files to bundle the CDM (adapter) in the right folder.
[email protected],[email protected],[email protected],[email protected],
BUG=582622,611990
TEST=All tests pass. Tested on Mac and Linux.
Review-Url: https://codereview.chromium.org/2005703002
Cr-Commit-Position: refs/heads/master@{#395280}
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index e504c2b5..530b972 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -1289,6 +1289,14 @@
"ui/app_list/test/test_app_list_controller_delegate.h",
]
}
+
+ if (enable_pepper_cdms) {
+ sources += [
+ "media/pepper_cdm_test_helper.cc",
+ "media/pepper_cdm_test_helper.h",
+ ]
+ deps += [ "//media:cdm_paths" ]
+ }
}
# In GYP this is part of test_support_ui.