diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-22 01:29:05 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-22 01:29:05 +0000 |
commit | 41fbf097c8e01c4971de118eb8fb791b9abaa6eb (patch) | |
tree | 8216ee10224ebb84ace23ef8d227e8ec07666bac /webkit/glue/plugins/webplugin_delegate_impl_mac.mm | |
parent | d77232f96be7900e1e7230d145c06bb9e5ed7e44 (diff) | |
download | chromium_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 'webkit/glue/plugins/webplugin_delegate_impl_mac.mm')
-rw-r--r-- | webkit/glue/plugins/webplugin_delegate_impl_mac.mm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm index f758ce0..54bf43b 100644 --- a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm +++ b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm @@ -13,6 +13,7 @@ #include "base/message_loop.h" #include "base/stats_counters.h" #include "base/string_util.h" +#include "webkit/api/public/WebInputEvent.h" #include "webkit/default_plugin/plugin_impl.h" #include "webkit/glue/glue_util.h" #include "webkit/glue/webplugin.h" @@ -23,6 +24,10 @@ #include "webkit/glue/plugins/plugin_stream_url.h" #include "webkit/glue/webkit_glue.h" +using WebKit::WebKeyboardEvent; +using WebKit::WebInputEvent; +using WebKit::WebMouseEvent; + namespace { const wchar_t kWebPluginDelegateProperty[] = L"WebPluginDelegateProperty"; @@ -413,10 +418,11 @@ void WebPluginDelegateImpl::SetFocus() { instance()->NPP_HandleEvent(&focus_event); } -bool WebPluginDelegateImpl::HandleEvent(NPEvent* event, - WebCursor* cursor) { +bool WebPluginDelegateImpl::HandleInputEvent(const WebInputEvent& event, + WebCursor* cursor) { DCHECK(windowless_) << "events should only be received in windowless mode"; DCHECK(cursor != NULL); + // TODO: convert event into a NPEvent, and call NPP_HandleEvent(np_event). return true; } |