summaryrefslogtreecommitdiff
path: root/Source/WebKit2/UIProcess/WebContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2/UIProcess/WebContext.cpp')
-rw-r--r--Source/WebKit2/UIProcess/WebContext.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/Source/WebKit2/UIProcess/WebContext.cpp b/Source/WebKit2/UIProcess/WebContext.cpp
index 381a25603..c9c0b94df 100644
--- a/Source/WebKit2/UIProcess/WebContext.cpp
+++ b/Source/WebKit2/UIProcess/WebContext.cpp
@@ -78,6 +78,10 @@
#include "WebSoupRequestManagerProxy.h"
#endif
+#if ENABLE(VIBRATION)
+#include "WebVibrationProxy.h"
+#endif
+
#ifndef NDEBUG
#include <wtf/RefCountedLeakCounter.h>
#endif
@@ -156,6 +160,9 @@ WebContext::WebContext(ProcessModel processModel, const String& injectedBundlePa
#if USE(SOUP)
, m_soupRequestManagerProxy(WebSoupRequestManagerProxy::create(this))
#endif
+#if ENABLE(VIBRATION)
+ , m_vibrationProxy(WebVibrationProxy::create(this))
+#endif
#if PLATFORM(WIN)
, m_shouldPaintNativeControls(true)
, m_initialHTTPCookieAcceptPolicy(HTTPCookieAcceptPolicyAlways)
@@ -237,6 +244,11 @@ WebContext::~WebContext()
m_soupRequestManagerProxy->clearContext();
#endif
+#if ENABLE(VIBRATION)
+ m_vibrationProxy->invalidate();
+ m_vibrationProxy->clearContext();
+#endif
+
invalidateCallbackMap(m_dictionaryCallbacks);
platformInvalidateContext();
@@ -438,6 +450,9 @@ void WebContext::disconnectProcess(WebProcessProxy* process)
#if USE(SOUP)
m_soupRequestManagerProxy->invalidate();
#endif
+#if ENABLE(VIBRATION)
+ m_vibrationProxy->invalidate();
+#endif
// When out of process plug-ins are enabled, we don't want to invalidate the plug-in site data
// manager just because the web process crashes since it's not involved.
@@ -822,6 +837,13 @@ void WebContext::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::Mes
}
#endif
+#if ENABLE(VIBRATION)
+ if (messageID.is<CoreIPC::MessageClassWebVibrationProxy>()) {
+ m_vibrationProxy->didReceiveMessage(connection, messageID, arguments);
+ return;
+ }
+#endif
+
switch (messageID.get<WebContextLegacyMessage::Kind>()) {
case WebContextLegacyMessage::PostMessage: {
String messageName;