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

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: Correct unittests. 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
« no previous file with comments | « media/blink/key_system_config_selector_unittest.cc ('k') | media/blink/webencryptedmediaclient_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webencryptedmediaclient_impl.h
diff --git a/media/blink/webencryptedmediaclient_impl.h b/media/blink/webencryptedmediaclient_impl.h
index 5a1f3e4a040817b7ccdb8835be21ad466e0cc648..ba8f9bdcad388739bf2844ee2cf943c658313598 100644
--- a/media/blink/webencryptedmediaclient_impl.h
+++ b/media/blink/webencryptedmediaclient_impl.h
@@ -7,6 +7,7 @@
#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"
@@ -31,8 +32,10 @@ class MediaPermission;
class MEDIA_EXPORT WebEncryptedMediaClientImpl
: public blink::WebEncryptedMediaClient {
public:
- WebEncryptedMediaClientImpl(CdmFactory* cdm_factory,
- MediaPermission* media_permission);
+ WebEncryptedMediaClientImpl(
+ base::Callback<bool(void)> are_secure_codecs_supported_cb,
+ CdmFactory* cdm_factory,
+ MediaPermission* media_permission);
virtual ~WebEncryptedMediaClientImpl();
// WebEncryptedMediaClient implementation.
@@ -58,7 +61,8 @@ class MEDIA_EXPORT WebEncryptedMediaClientImpl
// accumulated configuration.
void OnRequestSucceeded(
blink::WebEncryptedMediaRequest request,
- const blink::WebMediaKeySystemConfiguration& accumulated_configuration);
+ const blink::WebMediaKeySystemConfiguration& accumulated_configuration,
+ bool are_secure_codecs_required);
// Complete a requestMediaKeySystemAccess() request with an error message.
void OnRequestNotSupported(blink::WebEncryptedMediaRequest request,
@@ -71,6 +75,7 @@ class MEDIA_EXPORT WebEncryptedMediaClientImpl
// Reporter singletons.
base::ScopedPtrHashMap<std::string, scoped_ptr<Reporter>> reporters_;
+ base::Callback<bool(void)> are_secure_codecs_supported_cb_;
CdmFactory* cdm_factory_;
KeySystemConfigSelector key_system_config_selector_;
base::WeakPtrFactory<WebEncryptedMediaClientImpl> weak_factory_;
« no previous file with comments | « media/blink/key_system_config_selector_unittest.cc ('k') | media/blink/webencryptedmediaclient_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698