summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell/webwidget_host_gtk.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/tools/test_shell/webwidget_host_gtk.cc')
-rw-r--r--webkit/tools/test_shell/webwidget_host_gtk.cc17
1 files changed, 12 insertions, 5 deletions
diff --git a/webkit/tools/test_shell/webwidget_host_gtk.cc b/webkit/tools/test_shell/webwidget_host_gtk.cc
index 57d88d8..90194c5 100644
--- a/webkit/tools/test_shell/webwidget_host_gtk.cc
+++ b/webkit/tools/test_shell/webwidget_host_gtk.cc
@@ -12,9 +12,15 @@
#include "skia/ext/bitmap_platform_device_linux.h"
#include "skia/ext/platform_canvas_linux.h"
#include "skia/ext/platform_device_linux.h"
-#include "webkit/glue/webinputevent.h"
+#include "third_party/WebKit/WebKit/chromium/public/gtk/WebInputEventFactory.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"
#include "webkit/glue/webwidget.h"
+using WebKit::WebInputEventFactory;
+using WebKit::WebKeyboardEvent;
+using WebKit::WebMouseEvent;
+using WebKit::WebMouseWheelEvent;
+
namespace {
// In response to an invalidation, we call into WebKit to do layout. On
@@ -145,7 +151,7 @@ class WebWidgetHostGtkWidget {
static gboolean HandleKeyPress(GtkWidget* widget,
GdkEventKey* event,
WebWidgetHost* host) {
- WebKeyboardEvent wke(event);
+ const WebKeyboardEvent& wke = WebInputEventFactory::keyboardEvent(event);
host->webwidget()->HandleInputEvent(&wke);
return FALSE;
@@ -188,7 +194,7 @@ class WebWidgetHostGtkWidget {
static gboolean HandleButtonPress(GtkWidget* widget,
GdkEventButton* event,
WebWidgetHost* host) {
- WebMouseEvent wme(event);
+ const WebMouseEvent& wme = WebInputEventFactory::mouseEvent(event);
host->webwidget()->HandleInputEvent(&wme);
return FALSE;
}
@@ -204,7 +210,7 @@ class WebWidgetHostGtkWidget {
static gboolean HandleMotionNotify(GtkWidget* widget,
GdkEventMotion* event,
WebWidgetHost* host) {
- WebMouseEvent wme(event);
+ const WebMouseEvent& wme = WebInputEventFactory::mouseEvent(event);
host->webwidget()->HandleInputEvent(&wme);
return FALSE;
}
@@ -213,7 +219,8 @@ class WebWidgetHostGtkWidget {
static gboolean HandleScroll(GtkWidget* widget,
GdkEventScroll* event,
WebWidgetHost* host) {
- WebMouseWheelEvent wmwe(event);
+ const WebMouseWheelEvent& wmwe =
+ WebInputEventFactory::mouseWheelEvent(event);
host->webwidget()->HandleInputEvent(&wmwe);
return FALSE;
}