Diff
Modified: trunk/Source/WebKit2/ChangeLog (102639 => 102640)
--- trunk/Source/WebKit2/ChangeLog 2011-12-13 00:48:36 UTC (rev 102639)
+++ trunk/Source/WebKit2/ChangeLog 2011-12-13 00:52:46 UTC (rev 102640)
@@ -1,3 +1,46 @@
+2011-12-12 Anders Carlsson <[email protected]>
+
+ Add EventDispatcher class to WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=74344
+
+ Reviewed by Sam Weinig.
+
+ The EventDispatcher is a singleton which will be in charge of dispatching events to WebPage objects.
+
+ * DerivedSources.make:
+ * DerivedSources.pri:
+ * GNUmakefile.am:
+ * Target.pri:
+ * WebKit2.xcodeproj/project.pbxproj:
+ * win/WebKit2.vcproj:
+ Add new files.
+
+ * Platform/CoreIPC/MessageID.h:
+ Add EventDispatcher.
+
+ * WebProcess/WebConnectionToUIProcess.cpp:
+ (WebKit::WebConnectionToUIProcess::WebConnectionToUIProcess):
+ (WebKit::WebConnectionToUIProcess::invalidate):
+ * WebProcess/WebConnectionToUIProcess.h:
+ WebConnectionToUIProcess doesn't need to be a QueueClient. Also, move the call to open into WebProcess since
+ we don't want to add queue clients after the connection has been opened.
+
+ * WebProcess/WebPage/EventDispatcher.cpp: Added.
+ (WebKit::EventDispatcher::EventDispatcher):
+ (WebKit::EventDispatcher::~EventDispatcher):
+ (WebKit::EventDispatcher::didReceiveMessageOnConnectionWorkQueue):
+ (WebKit::EventDispatcher::wheelEvent):
+ * WebProcess/WebPage/EventDispatcher.h:
+ * WebProcess/WebPage/EventDispatcher.messages.in: Added.
+ Add new stub files.
+
+ * WebProcess/WebProcess.cpp:
+ (WebKit::WebProcess::initialize):
+ Add the event dispatcher as a queue client.
+
+ * WebProcess/WebProcess.h:
+ Add an EventDispatcher member variable to the web process.
+
2011-12-12 Sam Weinig <[email protected]>
Prefix internal methods in Objective-C API files with an underscore
Modified: trunk/Source/WebKit2/DerivedSources.make (102639 => 102640)
--- trunk/Source/WebKit2/DerivedSources.make 2011-12-13 00:48:36 UTC (rev 102639)
+++ trunk/Source/WebKit2/DerivedSources.make 2011-12-13 00:52:46 UTC (rev 102640)
@@ -49,6 +49,7 @@
DrawingArea \
DrawingAreaProxy \
DownloadProxy \
+ EventDispatcher \
NPObjectMessageReceiver \
PluginControllerProxy \
PluginProcess \
Modified: trunk/Source/WebKit2/DerivedSources.pri (102639 => 102640)
--- trunk/Source/WebKit2/DerivedSources.pri 2011-12-13 00:48:36 UTC (rev 102639)
+++ trunk/Source/WebKit2/DerivedSources.pri 2011-12-13 00:52:46 UTC (rev 102640)
@@ -62,6 +62,7 @@
AuthenticationManager.messages.in \
DownloadProxy.messages.in \
DrawingAreaProxy.messages.in \
+ EventDispatcher.messages.in \
LayerTreeHostProxy.messages.in \
PluginControllerProxy.messages.in \
PluginProcess.messages.in \
Modified: trunk/Source/WebKit2/GNUmakefile.am (102639 => 102640)
--- trunk/Source/WebKit2/GNUmakefile.am 2011-12-13 00:48:36 UTC (rev 102639)
+++ trunk/Source/WebKit2/GNUmakefile.am 2011-12-13 00:52:46 UTC (rev 102640)
@@ -97,10 +97,10 @@
DerivedSources/WebKit2/AuthenticationManagerMessages.h \
DerivedSources/WebKit2/DrawingAreaMessageReceiver.cpp \
DerivedSources/WebKit2/DrawingAreaMessages.h \
+ DerivedSources/WebKit2/DrawingAreaProxyMessageReceiver.cpp \
DerivedSources/WebKit2/DrawingAreaProxyMessages.h \
- DerivedSources/WebKit2/DrawingAreaProxyMessageReceiver.cpp \
- DerivedSources/WebKit2/DownloadProxyMessageReceiver.cpp \
- DerivedSources/WebKit2/DownloadProxyMessages.h \
+ DerivedSources/WebKit2/EventDispatcherMessageReceiver.cpp \
+ DerivedSources/WebKit2/EventDispatcherMessages.h \
DerivedSources/WebKit2/NPObjectMessageReceiverMessageReceiver.cpp \
DerivedSources/WebKit2/NPObjectMessageReceiverMessages.h \
DerivedSources/WebKit2/PluginControllerProxyMessageReceiver.cpp \
@@ -879,6 +879,8 @@
Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h \
Source/WebKit2/WebProcess/WebPage/EncoderAdapter.cpp \
Source/WebKit2/WebProcess/WebPage/EncoderAdapter.h \
+ Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp \
+ Source/WebKit2/WebProcess/WebPage/EventDispatcher.h \
Source/WebKit2/WebProcess/WebPage/FindController.cpp \
Source/WebKit2/WebProcess/WebPage/FindController.h \
Source/WebKit2/WebProcess/WebPage/gtk/WebInspectorGtk.cpp \
Modified: trunk/Source/WebKit2/Platform/CoreIPC/MessageID.h (102639 => 102640)
--- trunk/Source/WebKit2/Platform/CoreIPC/MessageID.h 2011-12-13 00:48:36 UTC (rev 102639)
+++ trunk/Source/WebKit2/Platform/CoreIPC/MessageID.h 2011-12-13 00:52:46 UTC (rev 102640)
@@ -52,7 +52,8 @@
MessageClassWebPage,
MessageClassWebProcess,
MessageClassWebResourceCacheManager,
-
+ MessageClassEventDispatcher,
+
// Messages sent by the web process to the UI process.
MessageClassDownloadProxy,
MessageClassDrawingAreaProxy,
Modified: trunk/Source/WebKit2/Target.pri (102639 => 102640)
--- trunk/Source/WebKit2/Target.pri 2011-12-13 00:48:36 UTC (rev 102639)
+++ trunk/Source/WebKit2/Target.pri 2011-12-13 00:52:46 UTC (rev 102640)
@@ -343,6 +343,7 @@
WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h \
WebProcess/WebPage/DrawingArea.h \
WebProcess/WebPage/DrawingAreaImpl.h \
+ WebProcess/WebPage/EventDispatcher.h \
WebProcess/WebPage/FindController.h \
WebProcess/WebPage/PageOverlay.h \
WebProcess/WebPage/WebContextMenu.h \
@@ -687,6 +688,7 @@
WebProcess/WebPage/DrawingArea.cpp \
WebProcess/WebPage/DrawingAreaImpl.cpp \
WebProcess/WebPage/EncoderAdapter.cpp \
+ WebProcess/WebPage/EventDispatcher.cpp \
WebProcess/WebPage/FindController.cpp \
WebProcess/WebPage/LayerTreeHost.cpp \
WebProcess/WebPage/PageOverlay.cpp \
Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (102639 => 102640)
--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj 2011-12-13 00:48:36 UTC (rev 102639)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj 2011-12-13 00:52:46 UTC (rev 102640)
@@ -189,6 +189,10 @@
1AA4792312A59FD9008236C3 /* PluginProcessMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AA4792212A59FD9008236C3 /* PluginProcessMac.mm */; };
1AA479B012A5A436008236C3 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1CD06100FA1BA0078DEBC /* Carbon.framework */; };
1AA56F2911E92BC80061B882 /* PluginController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA56F2811E92BC80061B882 /* PluginController.h */; };
+ 1AA575FA1496B52600A4EE06 /* EventDispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA575F81496B52600A4EE06 /* EventDispatcher.cpp */; };
+ 1AA575FB1496B52600A4EE06 /* EventDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA575F91496B52600A4EE06 /* EventDispatcher.h */; };
+ 1AA575FE1496B6F300A4EE06 /* EventDispatcher.messages.in in Resources */ = {isa = PBXBuildFile; fileRef = 1AA575FD1496B6F300A4EE06 /* EventDispatcher.messages.in */; };
+ 1AA576021496B97900A4EE06 /* EventDispatcherMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA575FF1496B7C000A4EE06 /* EventDispatcherMessageReceiver.cpp */; };
1AA5889211EE70400061B882 /* NetscapePluginStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA5889011EE70400061B882 /* NetscapePluginStream.h */; };
1AA5889311EE70400061B882 /* NetscapePluginStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA5889111EE70400061B882 /* NetscapePluginStream.cpp */; };
1AAB4A8D1296F0A20023952F /* SandboxExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAB4A8C1296F0A20023952F /* SandboxExtension.h */; };
@@ -1178,6 +1182,11 @@
1AA41AB412C02EC4002BE67B /* EditorState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditorState.h; sourceTree = "<group>"; };
1AA4792212A59FD9008236C3 /* PluginProcessMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PluginProcessMac.mm; sourceTree = "<group>"; };
1AA56F2811E92BC80061B882 /* PluginController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginController.h; sourceTree = "<group>"; };
+ 1AA575F81496B52600A4EE06 /* EventDispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventDispatcher.cpp; sourceTree = "<group>"; };
+ 1AA575F91496B52600A4EE06 /* EventDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventDispatcher.h; sourceTree = "<group>"; };
+ 1AA575FD1496B6F300A4EE06 /* EventDispatcher.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = EventDispatcher.messages.in; sourceTree = "<group>"; };
+ 1AA575FF1496B7C000A4EE06 /* EventDispatcherMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventDispatcherMessageReceiver.cpp; sourceTree = "<group>"; };
+ 1AA576001496B7C000A4EE06 /* EventDispatcherMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventDispatcherMessages.h; sourceTree = "<group>"; };
1AA5889011EE70400061B882 /* NetscapePluginStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetscapePluginStream.h; sourceTree = "<group>"; };
1AA5889111EE70400061B882 /* NetscapePluginStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetscapePluginStream.cpp; sourceTree = "<group>"; };
1AAB4A8C1296F0A20023952F /* SandboxExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SandboxExtension.h; sourceTree = "<group>"; };
@@ -2777,6 +2786,9 @@
1A6421F412DCFBAB00CAAE2C /* DrawingAreaImpl.h */,
93FC679F12D3CC7400A60610 /* EncoderAdapter.cpp */,
93FC67A012D3CC7400A60610 /* EncoderAdapter.h */,
+ 1AA575FD1496B6F300A4EE06 /* EventDispatcher.messages.in */,
+ 1AA575F81496B52600A4EE06 /* EventDispatcher.cpp */,
+ 1AA575F91496B52600A4EE06 /* EventDispatcher.h */,
1A90C1F31264FD71003E44D4 /* FindController.cpp */,
1A90C1F21264FD71003E44D4 /* FindController.h */,
1A186EE912EF7618008E5F37 /* LayerTreeHost.cpp */,
@@ -3534,6 +3546,8 @@
1A64229812DD029200CAAE2C /* DrawingAreaMessages.h */,
1A64230612DD09EB00CAAE2C /* DrawingAreaProxyMessageReceiver.cpp */,
1A64230712DD09EB00CAAE2C /* DrawingAreaProxyMessages.h */,
+ 1AA575FF1496B7C000A4EE06 /* EventDispatcherMessageReceiver.cpp */,
+ 1AA576001496B7C000A4EE06 /* EventDispatcherMessages.h */,
1A2D8437127F65D5001EB962 /* NPObjectMessageReceiverMessageReceiver.cpp */,
1A2D8438127F65D5001EB962 /* NPObjectMessageReceiverMessages.h */,
1A8EF96C1252AF6B00F7067F /* PluginControllerProxyMessageReceiver.cpp */,
@@ -4129,6 +4143,7 @@
BCA284D71492F2C7001F9042 /* WKConnection.h in Headers */,
BC5C75C814954DA600BC4775 /* WKConnectionInternal.h in Headers */,
5DA6ED0A1490606900B41D12 /* DynamicLinkerEnvironmentExtractor.h in Headers */,
+ 1AA575FB1496B52600A4EE06 /* EventDispatcher.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -4274,6 +4289,7 @@
files = (
6D8A91A611F0EFD100DD01FE /* com.apple.WebProcess.sb in Resources */,
E133FD8A1423DD7F00FC7BFB /* WebKit.icns in Resources */,
+ 1AA575FE1496B6F300A4EE06 /* EventDispatcher.messages.in in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -4849,6 +4865,8 @@
31312620148FF82C00BA2A39 /* WebNotificationManager.cpp in Sources */,
BCA284D61492F2C7001F9042 /* WKConnection.mm in Sources */,
5DA6ED0B1490606900B41D12 /* DynamicLinkerEnvironmentExtractor.mm in Sources */,
+ 1AA575FA1496B52600A4EE06 /* EventDispatcher.cpp in Sources */,
+ 1AA576021496B97900A4EE06 /* EventDispatcherMessageReceiver.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Modified: trunk/Source/WebKit2/WebProcess/WebConnectionToUIProcess.cpp (102639 => 102640)
--- trunk/Source/WebKit2/WebProcess/WebConnectionToUIProcess.cpp 2011-12-13 00:48:36 UTC (rev 102639)
+++ trunk/Source/WebKit2/WebProcess/WebConnectionToUIProcess.cpp 2011-12-13 00:52:46 UTC (rev 102640)
@@ -43,15 +43,10 @@
{
m_connection->setDidCloseOnConnectionWorkQueueCallback(ChildProcess::didCloseOnConnectionWorkQueue);
m_connection->setShouldExitOnSyncMessageSendFailure(true);
- m_connection->addQueueClient(this);
-
- m_connection->open();
}
void WebConnectionToUIProcess::invalidate()
{
- m_connection->removeQueueClient(this);
-
m_connection->invalidate();
m_connection = nullptr;
m_process = 0;
@@ -117,11 +112,4 @@
}
#endif
-// CoreIPC::Connection::QueueClient
-
-void WebConnectionToUIProcess::didReceiveMessageOnConnectionWorkQueue(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, bool& didHandleMessage)
-{
- m_process->didReceiveWebProcessMessageOnConnectionWorkQueue(connection, messageID, arguments, didHandleMessage);
-}
-
} // namespace WebKit
Modified: trunk/Source/WebKit2/WebProcess/WebConnectionToUIProcess.h (102639 => 102640)
--- trunk/Source/WebKit2/WebProcess/WebConnectionToUIProcess.h 2011-12-13 00:48:36 UTC (rev 102639)
+++ trunk/Source/WebKit2/WebProcess/WebConnectionToUIProcess.h 2011-12-13 00:52:46 UTC (rev 102640)
@@ -33,7 +33,7 @@
class WebProcess;
-class WebConnectionToUIProcess : public WebConnection, CoreIPC::Connection::Client, CoreIPC::Connection::QueueClient {
+class WebConnectionToUIProcess : public WebConnection, CoreIPC::Connection::Client {
public:
static PassRefPtr<WebConnectionToUIProcess> create(WebProcess*, CoreIPC::Connection::Identifier, RunLoop*);
@@ -57,9 +57,6 @@
virtual Vector<HWND> windowsToReceiveSentMessagesWhileWaitingForSyncReply();
#endif
- // CoreIPC::Connection::QueueClient
- virtual void didReceiveMessageOnConnectionWorkQueue(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, bool& didHandleMessage) OVERRIDE;
-
WebProcess* m_process;
RefPtr<CoreIPC::Connection> m_connection;
};
Added: trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp (0 => 102640)
--- trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp 2011-12-13 00:52:46 UTC (rev 102640)
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "EventDispatcher.h"
+
+namespace WebKit {
+
+EventDispatcher::EventDispatcher()
+{
+}
+
+EventDispatcher::~EventDispatcher()
+{
+}
+
+void EventDispatcher::didReceiveMessageOnConnectionWorkQueue(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, bool& didHandleMessage)
+{
+ if (messageID.is<CoreIPC::MessageClassEventDispatcher>()) {
+ didReceiveEventDispatcherMessageOnConnectionWorkQueue(connection, messageID, arguments, didHandleMessage);
+ return;
+ }
+}
+
+void EventDispatcher::wheelEvent(const WebWheelEvent&)
+{
+}
+
+} // namespace WebKit
Copied: trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.h (from rev 102637, trunk/Source/WebKit2/WebProcess/WebConnectionToUIProcess.h) (0 => 102640)
--- trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.h (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.h 2011-12-13 00:52:46 UTC (rev 102640)
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef EventDispatcher_h
+#define EventDispatcher_h
+
+#include "Connection.h"
+#include <wtf/Noncopyable.h>
+#include <wtf/ThreadingPrimitives.h>
+
+namespace WebKit {
+
+class WebWheelEvent;
+
+class EventDispatcher : public CoreIPC::Connection::QueueClient {
+public:
+ EventDispatcher();
+ ~EventDispatcher();
+
+private:
+ // CoreIPC::Connection::QueueClient
+ virtual void didReceiveMessageOnConnectionWorkQueue(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, bool& didHandleMessage) OVERRIDE;
+
+ // Implemented in generated EventDispatcherMessageReceiver.cpp
+ void didReceiveEventDispatcherMessageOnConnectionWorkQueue(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder* arguments, bool& didHandleMessage);
+
+ // Message handlers
+ void wheelEvent(const WebWheelEvent&);
+};
+
+} // namespace WebKit
+
+#endif // EventDispatcher_h
Added: trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.messages.in (0 => 102640)
--- trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.messages.in (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.messages.in 2011-12-13 00:52:46 UTC (rev 102640)
@@ -0,0 +1,25 @@
+# Copyright (C) 2011 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+messages -> EventDispatcher {
+ WheelEvent(WebKit::WebWheelEvent event) DispatchOnConnectionQueue
+}
Modified: trunk/Source/WebKit2/WebProcess/WebProcess.cpp (102639 => 102640)
--- trunk/Source/WebKit2/WebProcess/WebProcess.cpp 2011-12-13 00:48:36 UTC (rev 102639)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.cpp 2011-12-13 00:52:46 UTC (rev 102640)
@@ -162,6 +162,11 @@
ASSERT(!m_connection);
m_connection = WebConnectionToUIProcess::create(this, serverIdentifier, runLoop);
+
+ m_connection->connection()->addQueueClient(&m_eventDispatcher);
+ m_connection->connection()->addQueueClient(this);
+
+ m_connection->connection()->open();
m_runLoop = runLoop;
startRandomCrashThreadIfRequested();
Modified: trunk/Source/WebKit2/WebProcess/WebProcess.h (102639 => 102640)
--- trunk/Source/WebKit2/WebProcess/WebProcess.h 2011-12-13 00:48:36 UTC (rev 102639)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.h 2011-12-13 00:52:46 UTC (rev 102640)
@@ -29,6 +29,7 @@
#include "CacheModel.h"
#include "ChildProcess.h"
#include "DrawingArea.h"
+#include "EventDispatcher.h"
#include "ResourceCachesToClear.h"
#include "SandboxExtension.h"
#include "SharedMemory.h"
@@ -224,6 +225,8 @@
HashMap<uint64_t, RefPtr<WebPageGroupProxy> > m_pageGroupMap;
RefPtr<InjectedBundle> m_injectedBundle;
+ EventDispatcher m_eventDispatcher;
+
bool m_inDidClose;
RunLoop* m_runLoop;
Modified: trunk/Source/WebKit2/win/WebKit2.vcproj (102639 => 102640)
--- trunk/Source/WebKit2/win/WebKit2.vcproj 2011-12-13 00:48:36 UTC (rev 102639)
+++ trunk/Source/WebKit2/win/WebKit2.vcproj 2011-12-13 00:52:46 UTC (rev 102640)
@@ -1990,6 +1990,14 @@
>
</File>
<File
+ RelativePath="..\WebProcess\WebPage\EventDispatcher.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\WebProcess\WebPage\EventDispatcher.h"
+ >
+ </File>
+ <File
RelativePath="..\WebProcess\WebPage\FindController.cpp"
>
</File>
@@ -4195,6 +4203,14 @@
>
</File>
<File
+ RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\EventDispatcherMessageReceiver.cpp"
+ >
+ </File>
+ <File
+ RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\EventDispatcherMessages.h"
+ >
+ </File>
+ <File
RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\WebApplicationCacheManagerMessageReceiver.cpp"
>
</File>