diff options
author | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-02 15:58:45 +0000 |
---|---|---|
committer | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-02 15:58:45 +0000 |
commit | 4eae29d3547aedf0388002a55b640571e6a91b5b (patch) | |
tree | e564b735e070ab67c980f39a50dabf60b87e587c /webkit/glue | |
parent | 8d54bd6a28c7b81936271b3cf1eb8e9ec768bd26 (diff) | |
download | chromium_src-4eae29d3547aedf0388002a55b640571e6a91b5b.zip chromium_src-4eae29d3547aedf0388002a55b640571e6a91b5b.tar.gz chromium_src-4eae29d3547aedf0388002a55b640571e6a91b5b.tar.bz2 |
Fix a bunch more type changes as part of the npapi.h merging
This makes two types of changes
- More int* -> int*_t transitions, since npapi.h switched over
- Replace TRUE/FALSE, which have been removed from the upstream npapi.h. Since all our usage is C++, true/false seemed cleaner than 1/0.
BUG=42645
TEST=Compiling still works
Review URL: http://codereview.chromium.org/2484002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48725 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/plugins/npapi_extension_thunk.cc | 50 | ||||
-rw-r--r-- | webkit/glue/plugins/plugin_host.cc | 16 |
2 files changed, 34 insertions, 32 deletions
diff --git a/webkit/glue/plugins/npapi_extension_thunk.cc b/webkit/glue/plugins/npapi_extension_thunk.cc index 5e06021..bcf4be1 100644 --- a/webkit/glue/plugins/npapi_extension_thunk.cc +++ b/webkit/glue/plugins/npapi_extension_thunk.cc @@ -27,7 +27,8 @@ static NPAPI::PluginInstance* FindInstance(NPP id) { // 2D device API --------------------------------------------------------------- -static NPError Device2DQueryCapability(NPP id, int32 capability, int32* value) { +static NPError Device2DQueryCapability(NPP id, int32_t capability, + int32_t* value) { scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); if (plugin) { plugin->webplugin()->delegate()->Device2DQueryCapability(capability, value); @@ -63,7 +64,7 @@ static NPError Device2DInitializeContext(NPP id, static NPError Device2DSetStateContext(NPP id, NPDeviceContext* context, - int32 state, + int32_t state, intptr_t value) { scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); if (plugin) { @@ -75,7 +76,7 @@ static NPError Device2DSetStateContext(NPP id, static NPError Device2DGetStateContext(NPP id, NPDeviceContext* context, - int32 state, + int32_t state, intptr_t* value) { scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); if (plugin) { @@ -120,26 +121,27 @@ static NPError Device2DDestroyContext(NPP id, static NPError Device2DCreateBuffer(NPP id, NPDeviceContext* context, size_t size, - int32* buffer_id) { + int32_t* buffer_id) { return NPERR_GENERIC_ERROR; } static NPError Device2DDestroyBuffer(NPP id, NPDeviceContext* context, - int32 buffer_id) { + int32_t buffer_id) { return NPERR_GENERIC_ERROR; } static NPError Device2DMapBuffer(NPP id, NPDeviceContext* context, - int32 buffer_id, + int32_t buffer_id, NPDeviceBuffer* buffer) { return NPERR_GENERIC_ERROR; } // 3D device API --------------------------------------------------------------- -static NPError Device3DQueryCapability(NPP id, int32 capability, int32* value) { +static NPError Device3DQueryCapability(NPP id, int32_t capability, + int32_t* value) { scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); if (plugin) { plugin->webplugin()->delegate()->Device3DQueryCapability(capability, value); @@ -175,7 +177,7 @@ static NPError Device3DInitializeContext(NPP id, static NPError Device3DSetStateContext(NPP id, NPDeviceContext* context, - int32 state, + int32_t state, intptr_t value) { scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); if (plugin) { @@ -187,7 +189,7 @@ static NPError Device3DSetStateContext(NPP id, static NPError Device3DGetStateContext(NPP id, NPDeviceContext* context, - int32 state, + int32_t state, intptr_t* value) { scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); if (plugin) { @@ -222,7 +224,7 @@ static NPError Device3DDestroyContext(NPP id, static NPError Device3DCreateBuffer(NPP id, NPDeviceContext* context, size_t size, - int32* buffer_id) { + int32_t* buffer_id) { scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); if (plugin) { return plugin->webplugin()->delegate()->Device3DCreateBuffer( @@ -233,7 +235,7 @@ static NPError Device3DCreateBuffer(NPP id, static NPError Device3DDestroyBuffer(NPP id, NPDeviceContext* context, - int32 buffer_id) { + int32_t buffer_id) { scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); if (plugin) { return plugin->webplugin()->delegate()->Device3DDestroyBuffer( @@ -244,7 +246,7 @@ static NPError Device3DDestroyBuffer(NPP id, static NPError Device3DMapBuffer(NPP id, NPDeviceContext* context, - int32 buffer_id, + int32_t buffer_id, NPDeviceBuffer* buffer) { scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); if (plugin) { @@ -256,7 +258,7 @@ static NPError Device3DMapBuffer(NPP id, // Experimental 3D device API -------------------------------------------------- -static NPError Device3DGetNumConfigs(NPP id, int32* num_configs) { +static NPError Device3DGetNumConfigs(NPP id, int32_t* num_configs) { scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); if (plugin) { return plugin->webplugin()->delegate()->Device3DGetNumConfigs(num_configs); @@ -265,8 +267,8 @@ static NPError Device3DGetNumConfigs(NPP id, int32* num_configs) { } static NPError Device3DGetConfigAttribs(NPP id, - int32 config, - int32* attrib_list) { + int32_t config, + int32_t* attrib_list) { scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); if (plugin) { return plugin->webplugin()->delegate()->Device3DGetConfigAttribs( @@ -277,8 +279,8 @@ static NPError Device3DGetConfigAttribs(NPP id, } static NPError Device3DCreateContext(NPP id, - int32 config, - const int32* attrib_list, + int32_t config, + const int32_t* attrib_list, NPDeviceContext** context) { scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); if (plugin) { @@ -294,8 +296,8 @@ static NPError Device3DSynchronizeContext( NPP id, NPDeviceContext* context, NPDeviceSynchronizationMode mode, - const int32* input_attrib_list, - int32* output_attrib_list, + const int32_t* input_attrib_list, + int32_t* output_attrib_list, NPDeviceSynchronizeContextCallbackPtr callback, void* callback_data) { scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); @@ -315,7 +317,7 @@ static NPError Device3DSynchronizeContext( static NPError Device3DRegisterCallback( NPP id, NPDeviceContext* context, - int32 callback_type, + int32_t callback_type, NPDeviceGenericCallbackPtr callback, void* callback_data) { scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); @@ -332,8 +334,8 @@ static NPError Device3DRegisterCallback( // Audio device API ------------------------------------------------------------ -static NPError DeviceAudioQueryCapability(NPP id, int32 capability, - int32* value) { +static NPError DeviceAudioQueryCapability(NPP id, int32_t capability, + int32_t* value) { scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); if (plugin) { plugin->webplugin()->delegate()->DeviceAudioQueryCapability(capability, @@ -370,7 +372,7 @@ static NPError DeviceAudioInitializeContext(NPP id, static NPError DeviceAudioSetStateContext(NPP id, NPDeviceContext* context, - int32 state, + int32_t state, intptr_t value) { scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); if (plugin) { @@ -382,7 +384,7 @@ static NPError DeviceAudioSetStateContext(NPP id, static NPError DeviceAudioGetStateContext(NPP id, NPDeviceContext* context, - int32 state, + int32_t state, intptr_t* value) { scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); return plugin->webplugin()->delegate()->DeviceAudioGetStateContext( diff --git a/webkit/glue/plugins/plugin_host.cc b/webkit/glue/plugins/plugin_host.cc index a6e0fde..f78efd1 100644 --- a/webkit/glue/plugins/plugin_host.cc +++ b/webkit/glue/plugins/plugin_host.cc @@ -606,7 +606,7 @@ void NPN_InvalidateRect(NPP id, NPRect *invalidRect) { rect.right = invalidRect->right; rect.top = invalidRect->top; rect.bottom = invalidRect->bottom; - ::InvalidateRect(plugin->window_handle(), &rect, FALSE); + ::InvalidateRect(plugin->window_handle(), &rect, false); return; } #endif @@ -712,13 +712,13 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) { break; case NPNVSupportsXEmbedBool: - *reinterpret_cast<NPBool*>(value) = TRUE; + *reinterpret_cast<NPBool*>(value) = true; rv = NPERR_NO_ERROR; break; #endif case NPNVSupportsWindowless: { NPBool* supports_windowless = reinterpret_cast<NPBool*>(value); - *supports_windowless = TRUE; + *supports_windowless = true; rv = NPERR_NO_ERROR; break; } @@ -762,7 +762,7 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) { // only want to use it as a fallback to keep plugins from crashing: if a // plugin knows enough to ask, we want them to use CoreGraphics. NPBool* supports_qd = reinterpret_cast<NPBool*>(value); - *supports_qd = FALSE; + *supports_qd = false; rv = NPERR_NO_ERROR; break; } @@ -774,14 +774,14 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) { case NPNVsupportsCocoaBool: { // we do support these drawing and event models. NPBool* supports_model = reinterpret_cast<NPBool*>(value); - *supports_model = TRUE; + *supports_model = true; rv = NPERR_NO_ERROR; break; } case NPNVsupportsCoreAnimationBool: { // We only support the Core Animation model on 10.6 and higher NPBool* supports_model = reinterpret_cast<NPBool*>(value); - *supports_model = SupportsSharingAcceleratedSurfaces() ? TRUE : FALSE; + *supports_model = SupportsSharingAcceleratedSurfaces() ? true : false; rv = NPERR_NO_ERROR; break; } @@ -789,7 +789,7 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) { // This drawing model was never widely supported, and we don't plan to // support it. NPBool* supports_model = reinterpret_cast<NPBool*>(value); - *supports_model = FALSE; + *supports_model = false; rv = NPERR_NO_ERROR; break; } @@ -1060,7 +1060,7 @@ NPBool NPN_ConvertPoint(NPP id, double sourceX, double sourceY, destX, destY, destSpace); } NOTREACHED(); - return FALSE; + return false; } } // extern "C" |