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

Unified Diff: chrome/BUILD.gn

Issue 2136983002: Bundle fake Widevine component manifest for stub CDM (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/widevine/cdm/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/BUILD.gn
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index aa67e96e67f7843df67ccc4146b956a977d33312..2e44872514c002affc0f71ad7822b7ebac0c8126 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -14,6 +14,7 @@ import("//build/config/win/manifest.gni")
import("//chrome/chrome_repack_locales.gni")
import("//chrome/common/features.gni")
import("//chrome/version.gni")
+import("//third_party/widevine/cdm/widevine.gni")
import("//ui/base/ui_features.gni")
import("//v8/gni/v8.gni")
@@ -844,21 +845,42 @@ if (is_win) {
}
}
- if (is_chrome_branded) {
+ _should_bundle_widevine =
+ (is_chrome_branded || enable_widevine) && enable_pepper_cdms
+ if (_should_bundle_widevine) {
+ # The Widevine CDM and manifest are either the actual Widevine CDM and
+ # manifest or stubs used for testing only. The choice is made within the
+ # corresponding Widevine targets based on branding.
bundle_data("widevine_cdm_library_binaries") {
sources = [
- "$root_out_dir/$widevine_cdm_path/libwidevinecdm.dylib",
+ "$root_out_dir/libwidevinecdm.dylib",
"$root_out_dir/$widevine_cdm_path/widevinecdmadapter.plugin",
]
outputs = [
"{{bundle_root_dir}}/Libraries/$widevine_cdm_path/{{source_file_part}}",
]
public_deps = [
- "//third_party/widevine/cdm:widevinecdm",
+ # Need this intermediate dependency because "widevinecdm" is a
+ # shared_library if !is_chrome_branded, and then depending on
+ # "widevinecdm" directly would cause it to be linked into the Chromium
+ # Framework, which we don't want.
+ ":widevine_cdm_library_copy",
"//third_party/widevine/cdm:widevinecdmadapter",
]
}
+ copy("widevine_cdm_library_copy") {
+ sources = [
+ "$root_out_dir/$widevine_cdm_path/libwidevinecdm.dylib",
+ ]
+ outputs = [
+ "$root_out_dir/{{source_file_part}}",
+ ]
+ deps = [
+ "//third_party/widevine/cdm:widevinecdm",
+ ]
+ }
+
bundle_data("widevine_cdm_library_manifest") {
sources = [
"$root_out_dir/WidevineCdm/manifest.json",
@@ -873,7 +895,7 @@ if (is_win) {
}
group("widevine_cdm_library") {
- if (is_chrome_branded) {
+ if (_should_bundle_widevine) {
deps = [
":widevine_cdm_library_binaries",
":widevine_cdm_library_manifest",
« no previous file with comments | « no previous file | third_party/widevine/cdm/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698