diff options
author | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-04 18:16:56 +0000 |
---|---|---|
committer | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-04 18:16:56 +0000 |
commit | 7edfe106be9de3a636a27304534c246c0f2f36b0 (patch) | |
tree | 479bed2636966a01c4e5b0cd5ec8f8dfb61a16e3 /webkit | |
parent | 49c3fdf47f6e7507ba1d78bf6b3813d1deb2c7d1 (diff) | |
download | chromium_src-7edfe106be9de3a636a27304534c246c0f2f36b0.zip chromium_src-7edfe106be9de3a636a27304534c246c0f2f36b0.tar.gz chromium_src-7edfe106be9de3a636a27304534c246c0f2f36b0.tar.bz2 |
Fix more type issues from the npapi.h tranisition to *_t types
Fixes the remaining not _t types in our plugin code
Removes the extra typedefs added to our copy of npapi.h
Adds headers to plugin code where necessary due to implicit dependencies on standard headers via basictypes.h
BUG=42645
TEST=Everything still compiles
Review URL: http://codereview.chromium.org/2505001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48952 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/default_plugin/plugin_main.cc | 20 | ||||
-rw-r--r-- | webkit/default_plugin/plugin_main.h | 10 | ||||
-rw-r--r-- | webkit/tools/npapi_layout_test_plugin/PluginObject.cpp | 1 | ||||
-rw-r--r-- | webkit/tools/npapi_layout_test_plugin/TestObject.cpp | 1 | ||||
-rw-r--r-- | webkit/tools/npapi_layout_test_plugin/main.cpp | 5 |
5 files changed, 20 insertions, 17 deletions
diff --git a/webkit/default_plugin/plugin_main.cc b/webkit/default_plugin/plugin_main.cc index 4d0fd5b..16f0f6b 100644 --- a/webkit/default_plugin/plugin_main.cc +++ b/webkit/default_plugin/plugin_main.cc @@ -101,7 +101,7 @@ bool NegotiateModels(NPP instance) { #if defined(OS_MACOSX) NPError err; // Set drawing model to core graphics - NPBool supportsCoreGraphics = FALSE; + NPBool supportsCoreGraphics = false; err = g_browser->getvalue(instance, NPNVsupportsCoreGraphicsBool, &supportsCoreGraphics); @@ -118,7 +118,7 @@ bool NegotiateModels(NPP instance) { } // Set event model to cocoa - NPBool supportsCocoaEvents = FALSE; + NPBool supportsCocoaEvents = false; err = g_browser->getvalue(instance, NPNVsupportsCocoaBool, &supportsCocoaEvents); @@ -136,7 +136,7 @@ bool NegotiateModels(NPP instance) { #elif defined(OS_POSIX) NPError err; // Check that chrome still supports xembed. - NPBool supportsXEmbed = FALSE; + NPBool supportsXEmbed = false; err = g_browser->getvalue(instance, NPNVSupportsXEmbedBool, &supportsXEmbed); @@ -158,7 +158,7 @@ bool NegotiateModels(NPP instance) { return true; } -NPError NPP_New(NPMIMEType plugin_type, NPP instance, uint16 mode, int16 argc, +NPError NPP_New(NPMIMEType plugin_type, NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved) { if (instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; @@ -172,7 +172,7 @@ NPError NPP_New(NPMIMEType plugin_type, NPP instance, uint16 mode, int16 argc, if (!NegotiateModels(instance)) return NPERR_INCOMPATIBLE_VERSION_ERROR; - + PluginInstallerImpl* plugin_impl = new PluginInstallerImpl(mode); plugin_impl->Initialize( #if defined(OS_WIN) @@ -231,7 +231,7 @@ NPError NPP_SetWindow(NPP instance, NPWindow* window_info) { } NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream* stream, - NPBool seekable, uint16* stype) { + NPBool seekable, uint16_t* stype) { if (instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; @@ -263,7 +263,7 @@ NPError NPP_DestroyStream(NPP instance, NPStream* stream, NPReason reason) { return NPERR_NO_ERROR; } -int32 NPP_WriteReady(NPP instance, NPStream* stream) { +int32_t NPP_WriteReady(NPP instance, NPStream* stream) { if (instance == NULL) return 0; @@ -280,7 +280,7 @@ int32 NPP_WriteReady(NPP instance, NPStream* stream) { return 0; } -int32 NPP_Write(NPP instance, NPStream* stream, int32 offset, int32 len, +int32_t NPP_Write(NPP instance, NPStream* stream, int32_t offset, int32_t len, void* buffer) { if (instance == NULL) return 0; @@ -315,7 +315,7 @@ void NPP_URLNotify(NPP instance, const char* url, NPReason reason, NPError NPP_GetValue(NPP instance, NPPVariable variable, void* value) { switch (variable) { case NPPVpluginNeedsXEmbed: - *static_cast<NPBool*>(value) = TRUE; + *static_cast<NPBool*>(value) = true; return NPERR_NO_ERROR; default: return NPERR_INVALID_PARAM; @@ -323,7 +323,7 @@ NPError NPP_GetValue(NPP instance, NPPVariable variable, void* value) { } #endif -int16 NPP_HandleEvent(NPP instance, void* event) { +int16_t NPP_HandleEvent(NPP instance, void* event) { if (instance == NULL) return 0; diff --git a/webkit/default_plugin/plugin_main.h b/webkit/default_plugin/plugin_main.h index dc1e071..50f3009 100644 --- a/webkit/default_plugin/plugin_main.h +++ b/webkit/default_plugin/plugin_main.h @@ -13,22 +13,22 @@ namespace default_plugin { extern NPNetscapeFuncs* g_browser; // Standard NPAPI functions. -NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, +NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved); NPError NPP_Destroy(NPP instance, NPSavedData** save); NPError NPP_SetWindow(NPP instance, NPWindow* window); NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream* stream, - NPBool seekable, uint16* stype); + NPBool seekable, uint16_t* stype); NPError NPP_DestroyStream(NPP instance, NPStream* stream, NPReason reason); -int32 NPP_WriteReady(NPP instance, NPStream* stream); -int32 NPP_Write(NPP instance, NPStream* stream, int32 offset, int32 len, +int32_t NPP_WriteReady(NPP instance, NPStream* stream); +int32_t NPP_Write(NPP instance, NPStream* stream, int32_t offset, int32_t len, void* buffer); #if defined(OS_POSIX) && !defined(OS_MACOSX) NPError NPP_GetValue(NPP instance, NPPVariable variable, void* value); #endif void NPP_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData); -int16 NPP_HandleEvent(NPP instance, void* event); +int16_t NPP_HandleEvent(NPP instance, void* event); #if defined(OS_POSIX) && !defined(OS_MACOSX) NPError API_CALL NP_Initialize(NPNetscapeFuncs* funcs, NPPluginFuncs* p_funcs); diff --git a/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp b/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp index 390f9ec..43bc616 100644 --- a/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp +++ b/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp @@ -29,6 +29,7 @@ #include <assert.h> #include <stdlib.h> #include <stdio.h> +#include <string.h> #ifdef WIN32 #define snprintf sprintf_s #endif diff --git a/webkit/tools/npapi_layout_test_plugin/TestObject.cpp b/webkit/tools/npapi_layout_test_plugin/TestObject.cpp index 0f7bbd1..170335a 100644 --- a/webkit/tools/npapi_layout_test_plugin/TestObject.cpp +++ b/webkit/tools/npapi_layout_test_plugin/TestObject.cpp @@ -27,6 +27,7 @@ #include "PluginObject.h" #include <stdlib.h> +#include <string.h> static bool testEnumerate(NPObject*, NPIdentifier **value, uint32_t *count); static bool testHasMethod(NPObject*, NPIdentifier name); diff --git a/webkit/tools/npapi_layout_test_plugin/main.cpp b/webkit/tools/npapi_layout_test_plugin/main.cpp index 94abff7..c061adb 100644 --- a/webkit/tools/npapi_layout_test_plugin/main.cpp +++ b/webkit/tools/npapi_layout_test_plugin/main.cpp @@ -33,6 +33,7 @@ #include <stdlib.h> #include <stdio.h> +#include <string.h> #include <wtf/Platform.h> #include "PluginObject.h" @@ -111,7 +112,7 @@ EXPORT void NPAPI NP_Shutdown(void) static void executeScript(const PluginObject* obj, const char* script); -NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16_t argc, char *argn[], char *argv[], NPSavedData *saved) +NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char *argn[], char *argv[], NPSavedData *saved) { if (browser->version >= 14) { PluginObject* obj = (PluginObject*)browser->createobject(instance, getPluginClass()); @@ -214,7 +215,7 @@ static void executeScript(const PluginObject* obj, const char* script) browser->releasevariantvalue(&browserResult); } -NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream *stream, NPBool seekable, uint16 *stype) +NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream *stream, NPBool seekable, uint16_t *stype) { PluginObject* obj = static_cast<PluginObject*>(instance->pdata); |