| Index: webkit/tools/npapi_pepper_test_plugin/main.cc
|
| ===================================================================
|
| --- webkit/tools/npapi_pepper_test_plugin/main.cc (revision 53977)
|
| +++ webkit/tools/npapi_pepper_test_plugin/main.cc (working copy)
|
| @@ -11,15 +11,54 @@
|
| #include "webkit/glue/plugins/test/plugin_client.h"
|
|
|
| extern "C" {
|
| -EXPORT NPError API_CALL NP_GetEntryPoints(NPPluginFuncs* pFuncs) {
|
| - return NPAPIClient::PluginClient::GetEntryPoints(pFuncs);
|
| +EXPORT NPError API_CALL NP_GetEntryPoints(NPPluginFuncs* nppFuncs) {
|
| + return NPAPIClient::PluginClient::GetEntryPoints(nppFuncs);
|
| }
|
|
|
| -EXPORT NPError API_CALL NP_Initialize(NPNetscapeFuncs* pFuncs) {
|
| - return NPAPIClient::PluginClient::Initialize(pFuncs);
|
| -}
|
| -
|
| EXPORT NPError API_CALL NP_Shutdown() {
|
| return NPAPIClient::PluginClient::Shutdown();
|
| }
|
| +
|
| +#if defined(OS_POSIX) && !defined(OS_MACOSX)
|
| +EXPORT NPError API_CALL NP_Initialize(NPNetscapeFuncs* npnFuncs,
|
| + NPPluginFuncs* nppFuncs) {
|
| + NPError error = NPAPIClient::PluginClient::Initialize(npnFuncs);
|
| + if (error == NPERR_NO_ERROR) {
|
| + error = NP_GetEntryPoints(nppFuncs);
|
| + }
|
| + return error;
|
| +}
|
| +
|
| +EXPORT NPError API_CALL NP_GetValue(NPP instance, NPPVariable variable,
|
| + void* value) {
|
| + NPError err = NPERR_NO_ERROR;
|
| +
|
| + switch (variable) {
|
| + case NPPVpluginNameString:
|
| + *(static_cast<const char**>(value)) = "NPAPI Pepper Test Plugin";
|
| + break;
|
| + case NPPVpluginDescriptionString:
|
| + *(static_cast<const char**>(value)) = "NPAPI Pepper Test Plugin";
|
| + break;
|
| + case NPPVpluginNeedsXEmbed:
|
| + *(static_cast<NPBool*>(value)) = true;
|
| + break;
|
| + default:
|
| + err = NPERR_GENERIC_ERROR;
|
| + break;
|
| + }
|
| +
|
| + return err;
|
| +}
|
| +
|
| +EXPORT const char* API_CALL NP_GetMIMEDescription() {
|
| + return "pepper-application/x-pepper-test:pepper:NPAPI Pepper Test Plugin";
|
| +}
|
| +#else // OS_POSIX
|
| +EXPORT NPError API_CALL NP_Initialize(NPNetscapeFuncs* npnFuncs) {
|
| + return NPAPIClient::PluginClient::Initialize(npnFuncs);
|
| +}
|
| +#endif // OS_POSIX
|
| +
|
| } // extern "C"
|
| +
|
|
|