summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/native_web_keyboard_event.h4
-rw-r--r--chrome/common/native_web_keyboard_event_linux.cc6
-rw-r--r--chrome/common/native_web_keyboard_event_mac.mm6
-rw-r--r--chrome/common/native_web_keyboard_event_win.cc8
-rw-r--r--chrome/common/render_messages.h46
-rw-r--r--chrome/common/render_messages_internal.h1
6 files changed, 42 insertions, 29 deletions
diff --git a/chrome/common/native_web_keyboard_event.h b/chrome/common/native_web_keyboard_event.h
index f4c22c0..0400b41 100644
--- a/chrome/common/native_web_keyboard_event.h
+++ b/chrome/common/native_web_keyboard_event.h
@@ -6,7 +6,7 @@
#define CHROME_COMMON_NATIVE_WEB_KEYBOARD_EVENT_H_
#include "base/basictypes.h"
-#include "webkit/glue/webinputevent.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"
#if defined(OS_WIN)
#include <windows.h>
@@ -22,7 +22,7 @@ class NSEvent;
// Owns a platform specific event; used to pass own and pass event through
// platform independent code.
-struct NativeWebKeyboardEvent : public WebKeyboardEvent {
+struct NativeWebKeyboardEvent : public WebKit::WebKeyboardEvent {
NativeWebKeyboardEvent();
#if defined(OS_WIN)
diff --git a/chrome/common/native_web_keyboard_event_linux.cc b/chrome/common/native_web_keyboard_event_linux.cc
index 744ba3d..a2e606f 100644
--- a/chrome/common/native_web_keyboard_event_linux.cc
+++ b/chrome/common/native_web_keyboard_event_linux.cc
@@ -4,6 +4,10 @@
#include "chrome/common/native_web_keyboard_event.h"
+#include "third_party/WebKit/WebKit/chromium/public/gtk/WebInputEventFactory.h"
+
+using WebKit::WebInputEventFactory;
+
namespace {
void CopyEventTo(const GdkEventKey* in, GdkEventKey** out) {
@@ -30,7 +34,7 @@ NativeWebKeyboardEvent::NativeWebKeyboardEvent()
}
NativeWebKeyboardEvent::NativeWebKeyboardEvent(const GdkEventKey* native_event)
- : WebKeyboardEvent(native_event) {
+ : WebKeyboardEvent(WebInputEventFactory::keyboardEvent(native_event)) {
CopyEventTo(native_event, &os_event);
}
diff --git a/chrome/common/native_web_keyboard_event_mac.mm b/chrome/common/native_web_keyboard_event_mac.mm
index 4e1b9b5..4586a96 100644
--- a/chrome/common/native_web_keyboard_event_mac.mm
+++ b/chrome/common/native_web_keyboard_event_mac.mm
@@ -6,12 +6,16 @@
#import <AppKit/AppKit.h>
+#include "third_party/WebKit/WebKit/chromium/public/mac/WebInputEventFactory.h"
+
+using WebKit::WebInputEventFactory;
+
NativeWebKeyboardEvent::NativeWebKeyboardEvent()
: os_event(NULL) {
}
NativeWebKeyboardEvent::NativeWebKeyboardEvent(NSEvent* event)
- : WebKeyboardEvent(event),
+ : WebKeyboardEvent(WebInputEventFactory::keyboardEvent(event)),
os_event([event retain]) {
}
diff --git a/chrome/common/native_web_keyboard_event_win.cc b/chrome/common/native_web_keyboard_event_win.cc
index 0e2e11f..184fc72 100644
--- a/chrome/common/native_web_keyboard_event_win.cc
+++ b/chrome/common/native_web_keyboard_event_win.cc
@@ -4,12 +4,18 @@
#include "chrome/common/native_web_keyboard_event.h"
+#include "third_party/WebKit/WebKit/chromium/public/win/WebInputEventFactory.h"
+
+using WebKit::WebInputEventFactory;
+using WebKit::WebKeyboardEvent;
+
NativeWebKeyboardEvent::NativeWebKeyboardEvent() {
}
NativeWebKeyboardEvent::NativeWebKeyboardEvent(
HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
- : WebKeyboardEvent(hwnd, message, wparam, lparam) {
+ : WebKeyboardEvent(
+ WebInputEventFactory::keyboardEvent(hwnd, message, wparam, lparam)) {
os_event.hwnd = hwnd;
os_event.message = message;
os_event.wParam = wparam;
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index 5f5bb6b..28dd519a 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -25,6 +25,7 @@
#include "net/http/http_response_headers.h"
#include "net/url_request/url_request_status.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCache.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"
#include "webkit/glue/autofill_form.h"
#include "webkit/glue/context_menu.h"
#include "webkit/glue/feed.h"
@@ -35,7 +36,6 @@
#include "webkit/glue/screen_info.h"
#include "webkit/glue/webaccessibility.h"
#include "webkit/glue/webdropdata.h"
-#include "webkit/glue/webinputevent.h"
#include "webkit/glue/webplugin.h"
#include "webkit/glue/webpreferences.h"
#include "webkit/glue/webview_delegate.h"
@@ -481,8 +481,8 @@ struct ParamTraits<ContextNode> {
};
template <>
-struct ParamTraits<WebInputEvent::Type> {
- typedef WebInputEvent::Type param_type;
+struct ParamTraits<WebKit::WebInputEvent::Type> {
+ typedef WebKit::WebInputEvent::Type param_type;
static void Write(Message* m, const param_type& p) {
m->WriteInt(p);
}
@@ -490,41 +490,41 @@ struct ParamTraits<WebInputEvent::Type> {
int type;
if (!m->ReadInt(iter, &type))
return false;
- *p = static_cast<WebInputEvent::Type>(type);
+ *p = static_cast<WebKit::WebInputEvent::Type>(type);
return true;
}
static void Log(const param_type& p, std::wstring* l) {
std::wstring type;
switch (p) {
- case WebInputEvent::MOUSE_DOWN:
- type = L"MOUSE_DOWN";
+ case WebKit::WebInputEvent::MouseDown:
+ type = L"MouseDown";
break;
- case WebInputEvent::MOUSE_UP:
- type = L"MOUSE_UP";
+ case WebKit::WebInputEvent::MouseUp:
+ type = L"MouseUp";
break;
- case WebInputEvent::MOUSE_MOVE:
- type = L"MOUSE_MOVE";
+ case WebKit::WebInputEvent::MouseMove:
+ type = L"MouseMove";
break;
- case WebInputEvent::MOUSE_LEAVE:
- type = L"MOUSE_LEAVE";
+ case WebKit::WebInputEvent::MouseLeave:
+ type = L"MouseLeave";
break;
- case WebInputEvent::MOUSE_DOUBLE_CLICK:
- type = L"MOUSE_DOUBLE_CLICK";
+ case WebKit::WebInputEvent::MouseDoubleClick:
+ type = L"MouseDoubleClick";
break;
- case WebInputEvent::MOUSE_WHEEL:
- type = L"MOUSE_WHEEL";
+ case WebKit::WebInputEvent::MouseWheel:
+ type = L"MouseWheel";
break;
- case WebInputEvent::RAW_KEY_DOWN:
- type = L"RAW_KEY_DOWN";
+ case WebKit::WebInputEvent::RawKeyDown:
+ type = L"RawKeyDown";
break;
- case WebInputEvent::KEY_DOWN:
- type = L"KEY_DOWN";
+ case WebKit::WebInputEvent::KeyDown:
+ type = L"KeyDown";
break;
- case WebInputEvent::KEY_UP:
- type = L"KEY_UP";
+ case WebKit::WebInputEvent::KeyUp:
+ type = L"KeyUp";
break;
default:
- type = L"UNKNOWN";
+ type = L"None";
break;
}
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h
index 8cd2d33..27e241e 100644
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.h
@@ -22,7 +22,6 @@
#include "webkit/glue/dom_operations.h"
#include "webkit/glue/screen_info.h"
#include "webkit/glue/webcursor.h"
-#include "webkit/glue/webinputevent.h"
#include "webkit/glue/webplugin.h"
// TODO(mpcomplete): rename ViewMsg and ViewHostMsg to something that makes