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-12-09 17:19:22 +0000
committersehr@google.com <sehr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-09 17:19:22 +0000
commit5f6397ecb4c7bc92295adc8d21bd87e698ac5622 (patch)
tree140bdcb6f5680147521296fabd1dafcb9159a892 /webkit/tools/pepper_test_plugin
parente5307cef6dcdc2ab5d4445cd57938dbf4d5e30c3 (diff)
downloadchromium_src-5f6397ecb4c7bc92295adc8d21bd87e698ac5622.zip
chromium_src-5f6397ecb4c7bc92295adc8d21bd87e698ac5622.tar.gz
chromium_src-5f6397ecb4c7bc92295adc8d21bd87e698ac5622.tar.bz2
Enable Pepper support by default, including building the test plugin.
This is needed because the NaCl plugin code that runs in the renderer needs to use Pepper APIs all the time, and NaCl support has been enabled by default for several months now. To cause an untrusted Pepper plugin to run in the renderer one needs to specify the --internal-pepper flag. I have also removed the enable_pepper flag from gyp. As the build of the GPU process was tied to this flag, I have renamed the flag to enable_gpu. TEST=none BUG=none Review URL: http://codereview.chromium.org/464074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34161 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/pepper_test_plugin')
-rw-r--r--webkit/tools/pepper_test_plugin/README10
-rw-r--r--webkit/tools/pepper_test_plugin/event_handler.cc5
-rw-r--r--webkit/tools/pepper_test_plugin/pepper_test_plugin.gyp3
3 files changed, 5 insertions, 13 deletions
diff --git a/webkit/tools/pepper_test_plugin/README b/webkit/tools/pepper_test_plugin/README
index 96c6397..4c8003b 100644
--- a/webkit/tools/pepper_test_plugin/README
+++ b/webkit/tools/pepper_test_plugin/README
@@ -1,18 +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, set the GYP_DEFINES environment
-variable to "enable_pepper=1". From a Windows command prompt:
- set GYP_DEFINES=enable_pepper=1
-
-Then rebuild the project files:
- gclient runhooks --force
-
-Then open the Chrome all.sln solution and rebuild the pepper_test_plugin and
+Open the Chrome all.sln solution and rebuild the pepper_test_plugin and
chrome projects.
To load this plugin in Chrome, use the command line flags:
--no-sandbox
+ --internal-pepper
--load-plugin=<<<YOUR CHECKOUT ROOT>>\src\webkit\tools\pepper_test_plugin\Debug\pepper_test_plugin.dll
A simple way to launch Chrome with these command line flags is to run the
diff --git a/webkit/tools/pepper_test_plugin/event_handler.cc b/webkit/tools/pepper_test_plugin/event_handler.cc
index 75ede4e..7884fac 100644
--- a/webkit/tools/pepper_test_plugin/event_handler.cc
+++ b/webkit/tools/pepper_test_plugin/event_handler.cc
@@ -28,6 +28,7 @@
#include <stdio.h>
#include <string>
+#include "base/basictypes.h"
#include "base/logging.h"
#include "base/string_util.h"
#include "webkit/tools/pepper_test_plugin/plugin_object.h"
@@ -127,11 +128,11 @@ int EventHandler::handle(void* event) {
str += StringPrintf(": mod %x, text: ",
npevent->u.character.modifier);
size_t i;
- for (i = 0; i < ARRAYSIZE(npevent->u.character.text); ++i) {
+ for (i = 0; i < arraysize(npevent->u.character.text); ++i) {
str += StringPrintf("%x ", npevent->u.character.text[i]);
}
str += ", unmod: ";
- for (i = 0; i < ARRAYSIZE(npevent->u.character.unmodifiedText); ++i) {
+ for (i = 0; i < arraysize(npevent->u.character.unmodifiedText); ++i) {
str += StringPrintf("%x ", npevent->u.character.unmodifiedText[i]);
}
break;
diff --git a/webkit/tools/pepper_test_plugin/pepper_test_plugin.gyp b/webkit/tools/pepper_test_plugin/pepper_test_plugin.gyp
index a19574e..5144e76 100644
--- a/webkit/tools/pepper_test_plugin/pepper_test_plugin.gyp
+++ b/webkit/tools/pepper_test_plugin/pepper_test_plugin.gyp
@@ -12,9 +12,6 @@
'include_dirs': [
'../../..', # Root of Chrome Checkout
],
- 'defines': [
- 'PEPPER_APIS_ENABLED',
- ],
'conditions': [
['OS=="win"', {
'product_name': 'pepper_test_plugin',