summaryrefslogtreecommitdiffstats
path: root/webkit/tools/pepper_test_plugin/main.cc
diff options
context:
space:
mode:
authorsehr@google.com <sehr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-08 04:35:22 +0000
committersehr@google.com <sehr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-08 04:35:22 +0000
commitafa09a4f216d897dc2f651f9a7053ffd81a29753 (patch)
tree21287b3a4de2dd3d7951a0cc0fdad60ea4ae5e25 /webkit/tools/pepper_test_plugin/main.cc
parentbf7e9637d7935075e56bd3d15df864f78312df53 (diff)
downloadchromium_src-afa09a4f216d897dc2f651f9a7053ffd81a29753.zip
chromium_src-afa09a4f216d897dc2f651f9a7053ffd81a29753.tar.gz
chromium_src-afa09a4f216d897dc2f651f9a7053ffd81a29753.tar.bz2
Enable pepper events to flow to the plugin. Also enable printing of the event
types observed at NPP_HandleEvent. Review URL: http://codereview.chromium.org/465110 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34038 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/pepper_test_plugin/main.cc')
-rw-r--r--webkit/tools/pepper_test_plugin/main.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/webkit/tools/pepper_test_plugin/main.cc b/webkit/tools/pepper_test_plugin/main.cc
index 091eddf..1b7da69 100644
--- a/webkit/tools/pepper_test_plugin/main.cc
+++ b/webkit/tools/pepper_test_plugin/main.cc
@@ -37,6 +37,7 @@
#include "base/logging.h"
#include "base/string_util.h"
#include "webkit/tools/pepper_test_plugin/plugin_object.h"
+#include "webkit/tools/pepper_test_plugin/event_handler.h"
#ifdef WIN32
#define NPAPI WINAPI
@@ -169,6 +170,7 @@ NPError NPP_New(NPMIMEType pluginType,
PluginObject* obj = reinterpret_cast<PluginObject*>(
browser->createobject(instance, PluginObject::GetPluginClass()));
instance->pdata = obj;
+ event_handler = new EventHandler(instance);
}
return NPERR_NO_ERROR;
@@ -222,7 +224,7 @@ void NPP_Print(NPP instance, NPPrint* platformPrint) {
}
int16 NPP_HandleEvent(NPP instance, void* event) {
- return 0;
+ return event_handler->handle(event);
}
void NPP_URLNotify(NPP instance, const char* url, NPReason reason,