diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-08 00:37:53 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-08 00:37:53 +0000 |
commit | ba1100d658069bcc3ed69a736cd45a1f2b81c8f3 (patch) | |
tree | c5e6f7f853ebf45ff037eefb9c69cdf1ebffa8f4 /webkit/tools/npapi_layout_test_plugin | |
parent | 2c60e7ec4964310acea2c9e57425647d7499cce1 (diff) | |
download | chromium_src-ba1100d658069bcc3ed69a736cd45a1f2b81c8f3.zip chromium_src-ba1100d658069bcc3ed69a736cd45a1f2b81c8f3.tar.gz chromium_src-ba1100d658069bcc3ed69a736cd45a1f2b81c8f3.tar.bz2 |
Stub out NPN_Construct.
Review URL: http://codereview.chromium.org/16564
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7707 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/npapi_layout_test_plugin')
-rw-r--r-- | webkit/tools/npapi_layout_test_plugin/PluginObject.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp b/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp index a828879..df8b40c 100644 --- a/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp +++ b/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp @@ -106,7 +106,8 @@ static const NPUTF8 *pluginPropertyIdentifierNames[NUM_PROPERTY_IDENTIFIERS] = { #define ID_TEST_IDENTIFIER_TO_INT 18 #define ID_TEST_POSTURL_FILE 19 #define ID_TEST_CALLBACK_AND_GET_VALUE 20 -#define NUM_METHOD_IDENTIFIERS 21 +#define ID_TEST_CONSTRUCT 21 +#define NUM_METHOD_IDENTIFIERS 22 static NPIdentifier pluginMethodIdentifiers[NUM_METHOD_IDENTIFIERS]; static const NPUTF8 *pluginMethodIdentifierNames[NUM_METHOD_IDENTIFIERS] = { @@ -132,6 +133,7 @@ static const NPUTF8 *pluginMethodIdentifierNames[NUM_METHOD_IDENTIFIERS] = { "testPostURLFile", // Chrome bug http://code.google.com/p/chromium/issues/detail?id=4270 "testCallbackAndGetValue", + "testConstruct", }; static NPUTF8* createCStringFromNPVariant(const NPVariant* variant) @@ -568,6 +570,14 @@ static bool testPostURLFile(PluginObject* obj, const NPVariant* args, uint32_t a return true; } +static bool testConstruct(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result) +{ + if (!argCount || !NPVARIANT_IS_OBJECT(args[0])) + return false; + + return browser->construct(obj->npp, NPVARIANT_TO_OBJECT(args[0]), args + 1, argCount - 1, result); +} + static bool pluginInvoke(NPObject* header, NPIdentifier name, const NPVariant* args, uint32_t argCount, NPVariant* result) { PluginObject* plugin = reinterpret_cast<PluginObject*>(header); @@ -725,6 +735,8 @@ static bool pluginInvoke(NPObject* header, NPIdentifier name, const NPVariant* a } } else if (name == pluginMethodIdentifiers[ID_TEST_CALLBACK_AND_GET_VALUE]) { return testCallbackAndGetValue(plugin, args, argCount, result); + } else if (name == pluginMethodIdentifiers[ID_TEST_CONSTRUCT]) { + return testConstruct(plugin, args, argCount, result); } return false; |