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

Unified Diff: media/blink/webencryptedmediaclient_impl.h

Issue 1124863005: Restrict use of hardware-secure codecs based on the RendererPreference. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@setsecurity
Patch Set: Rename secure_codec -> secure_surface in some cases. Created 5 years, 7 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
Index: media/blink/webencryptedmediaclient_impl.h
diff --git a/media/blink/webencryptedmediaclient_impl.h b/media/blink/webencryptedmediaclient_impl.h
index 5a1f3e4a040817b7ccdb8835be21ad466e0cc648..53dfb5d7158df55affd59cfee663ff533c5f94f5 100644
--- a/media/blink/webencryptedmediaclient_impl.h
+++ b/media/blink/webencryptedmediaclient_impl.h
@@ -7,9 +7,11 @@
#include <string>
+#include "base/callback.h"
#include "base/containers/scoped_ptr_hash_map.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
+#include "build/build_config.h"
#include "media/base/media_export.h"
#include "media/blink/key_system_config_selector.h"
#include "third_party/WebKit/public/platform/WebEncryptedMediaClient.h"
@@ -31,8 +33,12 @@ class MediaPermission;
class MEDIA_EXPORT WebEncryptedMediaClientImpl
: public blink::WebEncryptedMediaClient {
public:
- WebEncryptedMediaClientImpl(CdmFactory* cdm_factory,
- MediaPermission* media_permission);
+ WebEncryptedMediaClientImpl(
+#if defined(OS_ANDROID)
+ base::Callback<bool(void)> allow_secure_surfaces_cb,
+#endif // defined(OS_ANDROID)
+ CdmFactory* cdm_factory,
+ MediaPermission* media_permission);
virtual ~WebEncryptedMediaClientImpl();
// WebEncryptedMediaClient implementation.
@@ -71,6 +77,9 @@ class MEDIA_EXPORT WebEncryptedMediaClientImpl
// Reporter singletons.
base::ScopedPtrHashMap<std::string, scoped_ptr<Reporter>> reporters_;
+#if defined(OS_ANDROID)
+ base::Callback<bool(void)> allow_secure_surfaces_cb_,
+#endif // defined(OS_ANDROID)
CdmFactory* cdm_factory_;
KeySystemConfigSelector key_system_config_selector_;
base::WeakPtrFactory<WebEncryptedMediaClientImpl> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698