| # Copyright 2014 The Chromium Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/buildflag_header.gni") |
| import("//components/cdm/common/playready.gni") |
| import("//third_party/widevine/cdm/widevine.gni") |
| |
| buildflag_header("buildflags") { |
| header = "buildflags.h" |
| flags = [ "ENABLE_PLAYREADY=$enable_playready" ] |
| } |
| |
| static_library("common") { |
| sources = [] |
| |
| # See //components/cdm/README.md |
| visibility = [ |
| "//android_webview/*", |
| "//chrome/*", |
| "//chromecast/*", |
| "//components/cdm/*", |
| "//content/shell/*", |
| "//fuchsia_web/*", |
| ] |
| |
| deps = [ |
| "//base", |
| "//content/public/common", |
| "//media", |
| ] |
| |
| if (is_android) { |
| sources += [ |
| "android_cdm_registration.cc", |
| "android_cdm_registration.h", |
| "clearkey_drm_delegate_android.cc", |
| "clearkey_drm_delegate_android.h", |
| "widevine_drm_delegate_android.cc", |
| "widevine_drm_delegate_android.h", |
| ] |
| |
| deps += [ |
| "//third_party/widevine/cdm:buildflags", |
| "//third_party/widevine/cdm:headers", |
| ] |
| } |
| |
| if (enable_playready) { |
| sources += [ "playready_cdm_common.h" ] |
| } |
| |
| if (enable_library_cdms) { |
| sources += [ |
| "cdm_manifest.cc", |
| "cdm_manifest.h", |
| ] |
| } |
| } |
| |
| if (enable_library_cdms) { |
| source_set("unit_tests") { |
| testonly = true |
| sources = [ "cdm_manifest_unittest.cc" ] |
| deps = [ |
| ":common", |
| "//content/public/common", |
| "//media", |
| "//media/cdm:cdm_api", |
| "//testing/gmock", |
| "//testing/gtest", |
| ] |
| } |
| } |