summaryrefslogtreecommitdiffstats
path: root/mojo
diff options
context:
space:
mode:
authorerg <erg@chromium.org>2015-04-16 17:51:48 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-17 00:52:12 +0000
commit56f123297ad298113d9a2dc6ed4b7de37dad9e3b (patch)
treeca27209c6b032d3f3c7a65309201bf340616b0bc /mojo
parent16b112790f541670d5f2ab97dfa70c8b89b44b1f (diff)
downloadchromium_src-56f123297ad298113d9a2dc6ed4b7de37dad9e3b.zip
chromium_src-56f123297ad298113d9a2dc6ed4b7de37dad9e3b.tar.gz
chromium_src-56f123297ad298113d9a2dc6ed4b7de37dad9e3b.tar.bz2
html_viewer: Move webcrypto to a place where html_viewer can use it.
A good chunk of the web (Facebook and YouTube) require webcrypto. This takes the code in the content/ directory, puts it in a new top level component directory, and uses it from html_viewer. BUG=476568 TBR=jochen Review URL: https://codereview.chromium.org/1077273002 Cr-Commit-Position: refs/heads/master@{#325571}
Diffstat (limited to 'mojo')
-rw-r--r--mojo/services/html_viewer/BUILD.gn1
-rw-r--r--mojo/services/html_viewer/DEPS1
-rw-r--r--mojo/services/html_viewer/blink_platform_impl.cc4
-rw-r--r--mojo/services/html_viewer/blink_platform_impl.h3
4 files changed, 9 insertions, 0 deletions
diff --git a/mojo/services/html_viewer/BUILD.gn b/mojo/services/html_viewer/BUILD.gn
index dad4dc7..54d4ccf 100644
--- a/mojo/services/html_viewer/BUILD.gn
+++ b/mojo/services/html_viewer/BUILD.gn
@@ -100,6 +100,7 @@ source_set("lib") {
"//cc",
"//cc/blink",
"//cc/surfaces",
+ "//components/webcrypto",
"//gin",
"//media",
"//media/blink",
diff --git a/mojo/services/html_viewer/DEPS b/mojo/services/html_viewer/DEPS
index 15bcb7a..867c136 100644
--- a/mojo/services/html_viewer/DEPS
+++ b/mojo/services/html_viewer/DEPS
@@ -3,6 +3,7 @@ include_rules = [
"+base/test",
"+blink/public/resources",
"+cc",
+ "+components/webcrypto",
"+gin",
"+media",
"+mojo/cc",
diff --git a/mojo/services/html_viewer/blink_platform_impl.cc b/mojo/services/html_viewer/blink_platform_impl.cc
index 71b024a..e9975a9 100644
--- a/mojo/services/html_viewer/blink_platform_impl.cc
+++ b/mojo/services/html_viewer/blink_platform_impl.cc
@@ -269,6 +269,10 @@ blink::WebGestureCurve* BlinkPlatformImpl::createFlingAnimationCurve(
is_main_thread).release();
}
+blink::WebCrypto* BlinkPlatformImpl::crypto() {
+ return &web_crypto_;
+}
+
blink::WebNotificationManager*
BlinkPlatformImpl::notificationManager() {
return &web_notification_manager_;
diff --git a/mojo/services/html_viewer/blink_platform_impl.h b/mojo/services/html_viewer/blink_platform_impl.h
index 9b2e49e..9489f35 100644
--- a/mojo/services/html_viewer/blink_platform_impl.h
+++ b/mojo/services/html_viewer/blink_platform_impl.h
@@ -10,6 +10,7 @@
#include "base/threading/thread_local_storage.h"
#include "base/timer/timer.h"
#include "cc/blink/web_compositor_support_impl.h"
+#include "components/webcrypto/webcrypto_impl.h"
#include "mojo/services/html_viewer/blink_resource_map.h"
#include "mojo/services/html_viewer/webmimeregistry_impl.h"
#include "mojo/services/html_viewer/webnotificationmanager_impl.h"
@@ -62,6 +63,7 @@ class BlinkPlatformImpl : public blink::Platform {
blink::WebGestureDevice device_source,
const blink::WebFloatPoint& velocity,
const blink::WebSize& cumulative_scroll);
+ virtual blink::WebCrypto* crypto();
virtual blink::WebNotificationManager* notificationManager();
private:
@@ -86,6 +88,7 @@ class BlinkPlatformImpl : public blink::Platform {
WebThemeEngineImpl theme_engine_;
WebMimeRegistryImpl mime_registry_;
WebSchedulerImpl scheduler_;
+ webcrypto::WebCryptoImpl web_crypto_;
WebNotificationManagerImpl web_notification_manager_;
blink::WebScrollbarBehavior scrollbar_behavior_;
BlinkResourceMap blink_resource_map_;