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

Unified Diff: content/shell/renderer/shell_content_renderer_client.cc

Issue 2268283003: media: Add External Clear Key content browser test on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 3 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 | « content/shell/renderer/shell_content_renderer_client.h ('k') | media/base/android/android_cdm_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/renderer/shell_content_renderer_client.cc
diff --git a/content/shell/renderer/shell_content_renderer_client.cc b/content/shell/renderer/shell_content_renderer_client.cc
index caeb020f3f69e2c3dacbcde42423131a8566cedd..04ae207af01a0f8541368c3d0d54d9444df45f53 100644
--- a/content/shell/renderer/shell_content_renderer_client.cc
+++ b/content/shell/renderer/shell_content_renderer_client.cc
@@ -10,6 +10,7 @@
#include "base/command_line.h"
#include "base/logging.h"
#include "base/macros.h"
+#include "components/cdm/renderer/external_clear_key_key_system_properties.h"
#include "components/web_cache/renderer/web_cache_impl.h"
#include "content/public/test/test_mojo_service.mojom.h"
#include "content/shell/common/shell_switches.h"
@@ -25,6 +26,11 @@
#include "ppapi/shared_impl/ppapi_switches.h"
#endif
+#if defined(OS_ANDROID)
+#include "base/feature_list.h"
+#include "media/base/media_switches.h"
+#endif
+
namespace content {
namespace {
@@ -134,4 +140,17 @@ void ShellContentRendererClient::ExposeInterfacesToBrowser(
base::Bind(&CreateTestMojoService));
}
+#if defined(OS_ANDROID)
+void ShellContentRendererClient::AddSupportedKeySystems(
+ std::vector<std::unique_ptr<media::KeySystemProperties>>* key_systems) {
+ if (!base::FeatureList::IsEnabled(media::kExternalClearKeyForTesting))
+ return;
+
+ static const char kExternalClearKeyKeySystem[] =
+ "org.chromium.externalclearkey";
+ key_systems->emplace_back(
+ new cdm::ExternalClearKeyProperties(kExternalClearKeyKeySystem));
+}
+#endif
+
} // namespace content
« no previous file with comments | « content/shell/renderer/shell_content_renderer_client.h ('k') | media/base/android/android_cdm_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698