summaryrefslogtreecommitdiffstats
path: root/webkit/tools/pepper_test_plugin
diff options
context:
space:
mode:
authorsehr@google.com <sehr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-27 17:20:58 +0000
committersehr@google.com <sehr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-27 17:20:58 +0000
commit2ebc6bcaf9c85181b8a0ad2aa664764c0da9cf29 (patch)
tree55ee114088571a729401006da62ada01b2e8dd24 /webkit/tools/pepper_test_plugin
parent9798829729b088b51017f20f704c87f86934a00a (diff)
downloadchromium_src-2ebc6bcaf9c85181b8a0ad2aa664764c0da9cf29.zip
chromium_src-2ebc6bcaf9c85181b8a0ad2aa664764c0da9cf29.tar.gz
chromium_src-2ebc6bcaf9c85181b8a0ad2aa664764c0da9cf29.tar.bz2
Make Pepper NPN variable return a pointer to an allocated
structure rather than using several variables. Added a stub DestroyRendererContext function. Updates the test to work with the changes. Review URL: http://codereview.chromium.org/322003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30213 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/pepper_test_plugin')
-rw-r--r--webkit/tools/pepper_test_plugin/README20
-rw-r--r--webkit/tools/pepper_test_plugin/plugin_object.cc14
2 files changed, 19 insertions, 15 deletions
diff --git a/webkit/tools/pepper_test_plugin/README b/webkit/tools/pepper_test_plugin/README
index f6c57cd7..5af73ad 100644
--- a/webkit/tools/pepper_test_plugin/README
+++ b/webkit/tools/pepper_test_plugin/README
@@ -1,8 +1,12 @@
-This is a test plugin for manual testing of the Pepper plugin API. See
- https://wiki.mozilla.org/Plugins:PlatformIndependentNPAPI
-
-To generate a project from the gyp file, use:
- python ..\..\..\build\gyp_chromium pepper_test_plugin.gyp
-
-To load this plugin in Chrome, use the command line flag:
- --load-plugin=<<<YOUR CHECKOUT ROOT>>\src\webkit\tools\pepper_test_plugin\Debug\pepper_test_plugin.dll
+This is a test plugin for manual testing of the Pepper plugin API. See
+ https://wiki.mozilla.org/Plugins:PlatformIndependentNPAPI
+
+To generate a project from the gyp file, use:
+ python ..\..\..\build\gyp_chromium pepper_test_plugin.gyp
+
+You need to enable PEPPER_APIS_ENABLED in src\chrome\renderer\render_view.cc in your Chrome build.
+
+To load this plugin in Chrome, use the command line flags:
+ --no-sandbox
+ --load-plugin=<<<YOUR CHECKOUT ROOT>>\src\webkit\tools\pepper_test_plugin\Debug\pepper_test_plugin.dll
+ \ No newline at end of file
diff --git a/webkit/tools/pepper_test_plugin/plugin_object.cc b/webkit/tools/pepper_test_plugin/plugin_object.cc
index 90908d0..bd3e9e2 100644
--- a/webkit/tools/pepper_test_plugin/plugin_object.cc
+++ b/webkit/tools/pepper_test_plugin/plugin_object.cc
@@ -237,14 +237,14 @@ void FlushCallback(NPRenderContext* context, void* user_data) {
PluginObject::PluginObject(NPP npp)
: npp_(npp),
test_object_(browser->createobject(npp, GetTestClass())) {
- if (!initialize_render_context) {
- browser->getvalue(npp_, NPNVInitializeRenderContextFunc,
- reinterpret_cast<void*>(&initialize_render_context));
+ if (!initialize_render_context || !flush_render_context) {
+ NPPepperExtensions* extensions;
+ browser->getvalue(npp_, NPNVPepperExtensions,
+ reinterpret_cast<void*>(&extensions));
+ CHECK(extensions);
+ initialize_render_context = extensions->initializeRender;
CHECK(initialize_render_context);
- }
- if (!flush_render_context) {
- browser->getvalue(npp_, NPNVFlushRenderContextFunc,
- reinterpret_cast<void*>(&flush_render_context));
+ flush_render_context = extensions->flushRender;
CHECK(flush_render_context);
}
}