summaryrefslogtreecommitdiffstats
path: root/chrome/plugin
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-22 01:29:05 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-22 01:29:05 +0000
commit41fbf097c8e01c4971de118eb8fb791b9abaa6eb (patch)
tree8216ee10224ebb84ace23ef8d227e8ec07666bac /chrome/plugin
parentd77232f96be7900e1e7230d145c06bb9e5ed7e44 (diff)
downloadchromium_src-41fbf097c8e01c4971de118eb8fb791b9abaa6eb.zip
chromium_src-41fbf097c8e01c4971de118eb8fb791b9abaa6eb.tar.gz
chromium_src-41fbf097c8e01c4971de118eb8fb791b9abaa6eb.tar.bz2
Add events to windowless plugins on linux. This CL also refactors the event
communication between WebPlugin and WebPluginDelegate, to use a cross-platform message based on WebInputEvent. BUG=8202 TEST=A lot of manual testing on Linux and Windows, with Flash plugins and a custom plugin that dumps events on Linux. Review URL: http://codereview.chromium.org/115330 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16692 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin')
-rw-r--r--chrome/plugin/webplugin_delegate_stub.cc11
-rw-r--r--chrome/plugin/webplugin_delegate_stub.h8
2 files changed, 12 insertions, 7 deletions
diff --git a/chrome/plugin/webplugin_delegate_stub.cc b/chrome/plugin/webplugin_delegate_stub.cc
index b76fc14..2188627 100644
--- a/chrome/plugin/webplugin_delegate_stub.cc
+++ b/chrome/plugin/webplugin_delegate_stub.cc
@@ -82,7 +82,7 @@ void WebPluginDelegateStub::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(PluginMsg_DidFinishLoadWithReason,
OnDidFinishLoadWithReason)
IPC_MESSAGE_HANDLER(PluginMsg_SetFocus, OnSetFocus)
- IPC_MESSAGE_HANDLER(PluginMsg_HandleEvent, OnHandleEvent)
+ IPC_MESSAGE_HANDLER(PluginMsg_HandleInputEvent, OnHandleInputEvent)
IPC_MESSAGE_HANDLER(PluginMsg_Paint, OnPaint)
IPC_MESSAGE_HANDLER(PluginMsg_DidPaint, OnDidPaint)
IPC_MESSAGE_HANDLER(PluginMsg_Print, OnPrint)
@@ -212,10 +212,11 @@ void WebPluginDelegateStub::OnSetFocus() {
delegate_->SetFocus();
}
-void WebPluginDelegateStub::OnHandleEvent(const NPEvent& event,
- bool* handled,
- WebCursor* cursor) {
- *handled = delegate_->HandleEvent(const_cast<NPEvent*>(&event), cursor);
+void WebPluginDelegateStub::OnHandleInputEvent(
+ const WebKit::WebInputEvent *event,
+ bool* handled,
+ WebCursor* cursor) {
+ *handled = delegate_->HandleInputEvent(*event, cursor);
}
void WebPluginDelegateStub::OnPaint(const gfx::Rect& damaged_rect) {
diff --git a/chrome/plugin/webplugin_delegate_stub.h b/chrome/plugin/webplugin_delegate_stub.h
index d2103a0..b09038c 100644
--- a/chrome/plugin/webplugin_delegate_stub.h
+++ b/chrome/plugin/webplugin_delegate_stub.h
@@ -24,6 +24,10 @@ struct PluginMsg_DidReceiveResponseParams;
struct PluginMsg_URLRequestReply_Params;
class WebCursor;
+namespace WebKit {
+class WebInputEvent;
+}
+
// Converts the IPC messages from WebPluginDelegateProxy into calls to the
// actual WebPluginDelegate object.
class WebPluginDelegateStub : public IPC::Channel::Listener,
@@ -57,8 +61,8 @@ class WebPluginDelegateStub : public IPC::Channel::Listener,
void OnDidFinishLoadWithReason(int reason);
void OnSetFocus();
- void OnHandleEvent(const NPEvent& event, bool* handled,
- WebCursor* cursor);
+ void OnHandleInputEvent(const WebKit::WebInputEvent* event,
+ bool* handled, WebCursor* cursor);
void OnPaint(const gfx::Rect& damaged_rect);
void OnDidPaint();