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

Unified Diff: components/html_viewer/html_document.cc

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
« no previous file with comments | « no previous file | content/renderer/render_frame_impl.h » ('j') | content/renderer/render_frame_impl.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/html_viewer/html_document.cc
diff --git a/components/html_viewer/html_document.cc b/components/html_viewer/html_document.cc
index 227dae3280360905fbce1ceccaabcbc185e17b14..418d0155fd3e986bebdc8ff8e133d08fb84b80c3 100644
--- a/components/html_viewer/html_document.cc
+++ b/components/html_viewer/html_document.cc
@@ -12,6 +12,7 @@
#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/thread_task_runner_handle.h"
+#include "build/build_config.h"
#include "components/html_viewer/blink_input_events_type_converters.h"
#include "components/html_viewer/blink_url_request_type_converters.h"
#include "components/html_viewer/web_layer_tree_view_impl.h"
@@ -328,6 +329,9 @@ void HTMLDocument::didNavigateWithinPage(
blink::WebEncryptedMediaClient* HTMLDocument::encryptedMediaClient() {
if (!web_encrypted_media_client_) {
web_encrypted_media_client_.reset(new media::WebEncryptedMediaClientImpl(
+#if defined(OS_ANDROID)
+ base::Bind(&AllowSecureSurfaces),
+#endif // defined(OS_ANDROID)
GetCdmFactory(), GetMediaPermission()));
}
return web_encrypted_media_client_.get();
@@ -382,4 +386,10 @@ media::CdmFactory* HTMLDocument::GetCdmFactory() {
return cdm_factory_.get();
}
+#if defined(OS_ANDROID)
+bool AllowSecureSurfaces() {
ddorwin 2015/05/06 02:17:11 This could be interrupted as doing something. Use
sandersd (OOO until July 31) 2015/05/08 00:37:42 Done.
+ return false;
ddorwin 2015/05/06 02:17:11 Add some sort of comment. i.e. not currently suppo
sandersd (OOO until July 31) 2015/05/08 00:37:42 Done.
+}
+#endif // defined(OS_ANDROID)
+
} // namespace html_viewer
« no previous file with comments | « no previous file | content/renderer/render_frame_impl.h » ('j') | content/renderer/render_frame_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698