diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-05 12:46:38 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-05 12:46:38 +0000 |
commit | f0a51fb571f46531025fa09240bbc3e1af925e84 (patch) | |
tree | 558b4f0e737fda4b9ab60f252c9c23b8a4ca523e /webkit/tools/npapi_layout_test_plugin | |
parent | 6390be368205705f49ead3cec40396519f13b889 (diff) | |
download | chromium_src-f0a51fb571f46531025fa09240bbc3e1af925e84.zip chromium_src-f0a51fb571f46531025fa09240bbc3e1af925e84.tar.gz chromium_src-f0a51fb571f46531025fa09240bbc3e1af925e84.tar.bz2 |
Fixes CRLF and trailing white spaces.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10982 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/npapi_layout_test_plugin')
6 files changed, 60 insertions, 60 deletions
diff --git a/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp b/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp index 2afda67..afcb60f 100644 --- a/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp +++ b/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp @@ -413,19 +413,19 @@ static bool destroyStream(PluginObject* obj, const NPVariant* args, uint32_t arg static bool testEnumerate(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result) { if (argCount == 2 && NPVARIANT_IS_OBJECT(args[0]) && NPVARIANT_IS_OBJECT(args[1])) { - uint32_t count; + uint32_t count; NPIdentifier* identifiers; if (browser->enumerate(obj->npp, NPVARIANT_TO_OBJECT(args[0]), &identifiers, &count)) { NPObject* outArray = NPVARIANT_TO_OBJECT(args[1]); NPIdentifier pushIdentifier = browser->getstringidentifier("push"); - + for (uint32_t i = 0; i < count; i++) { NPUTF8* string = browser->utf8fromidentifier(identifiers[i]); - + if (!string) continue; - + NPVariant args[1]; STRINGZ_TO_NPVARIANT(string, args[0]); NPVariant browserResult; @@ -433,12 +433,12 @@ static bool testEnumerate(PluginObject* obj, const NPVariant* args, uint32_t arg browser->releasevariantvalue(&browserResult); browser->memfree(string); } - + browser->memfree(identifiers); } - + VOID_TO_NPVARIANT(*result); - return true; + return true; } return false; } @@ -639,7 +639,7 @@ static bool pluginInvoke(NPObject* header, NPIdentifier name, const NPVariant* a // object before returning it and the calling JS gets a garbage // value. Firefox handles it fine. OBJECT_TO_NPVARIANT(NPVARIANT_TO_OBJECT(browserResult), *result); - } else { + } else { browser->releasevariantvalue(&browserResult); VOID_TO_NPVARIANT(*result); } @@ -682,21 +682,21 @@ static bool pluginInvoke(NPObject* header, NPIdentifier name, const NPVariant* a // NPObject. // Arguments: // arg1: Callback that returns a script object. - // arg2: Name of the method to call on the script object returned + // arg2: Name of the method to call on the script object returned // from the callback NPObject *windowScriptObject; - browser->getvalue(plugin->npp, NPNVWindowNPObject, + browser->getvalue(plugin->npp, NPNVWindowNPObject, &windowScriptObject); // Arg1 is the name of the callback NPUTF8* callbackString = createCStringFromNPVariant(&args[0]); - NPIdentifier callbackIdentifier = + NPIdentifier callbackIdentifier = browser->getstringidentifier(callbackString); free(callbackString); // Invoke a callback that returns a script object NPVariant object_result; - browser->invoke(plugin->npp, windowScriptObject, callbackIdentifier, + browser->invoke(plugin->npp, windowScriptObject, callbackIdentifier, &args[1], 1, &object_result); // Script object returned @@ -704,7 +704,7 @@ static bool pluginInvoke(NPObject* header, NPIdentifier name, const NPVariant* a // Arg2 is the name of the method to be called on the script object NPUTF8* object_mehod_string = createCStringFromNPVariant(&args[1]); - NPIdentifier object_method = + NPIdentifier object_method = browser->getstringidentifier(object_mehod_string); free(object_mehod_string); @@ -729,7 +729,7 @@ static bool pluginInvoke(NPObject* header, NPIdentifier name, const NPVariant* a // value. Firefox handles it fine. OBJECT_TO_NPVARIANT(NPVARIANT_TO_OBJECT(object_method_result), *result); - } else { + } else { browser->releasevariantvalue(&object_method_result); VOID_TO_NPVARIANT(*result); } diff --git a/webkit/tools/npapi_layout_test_plugin/PluginObject.h b/webkit/tools/npapi_layout_test_plugin/PluginObject.h index f344a36..5027f22 100644 --- a/webkit/tools/npapi_layout_test_plugin/PluginObject.h +++ b/webkit/tools/npapi_layout_test_plugin/PluginObject.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "webkit/glue/plugins/nphostapi.h" diff --git a/webkit/tools/npapi_layout_test_plugin/TestObject.cpp b/webkit/tools/npapi_layout_test_plugin/TestObject.cpp index e82ba13..659da76 100644 --- a/webkit/tools/npapi_layout_test_plugin/TestObject.cpp +++ b/webkit/tools/npapi_layout_test_plugin/TestObject.cpp @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "TestObject.h" @@ -35,10 +35,10 @@ static bool testGetProperty(NPObject *obj, NPIdentifier name, NPVariant *variant static NPObject *testAllocate(NPP npp, NPClass *theClass); static void testDeallocate(NPObject *obj); -static NPClass testClass = { +static NPClass testClass = { NP_CLASS_STRUCT_VERSION, - testAllocate, - testDeallocate, + testAllocate, + testDeallocate, 0, 0, 0, @@ -88,16 +88,16 @@ static NPObject *testAllocate(NPP npp, NPClass *theClass) static_cast<TestObject*>(malloc(sizeof(TestObject))); newInstance->testObject = NULL; ++testObjectCount; - + if (!identifiersInitialized) { identifiersInitialized = true; initializeIdentifiers(); } - + return reinterpret_cast<NPObject*>(newInstance); } -static void testDeallocate(NPObject *obj) +static void testDeallocate(NPObject *obj) { TestObject *testObject = reinterpret_cast<TestObject*>(obj); if (testObject->testObject) @@ -119,11 +119,11 @@ static bool testHasProperty(NPObject *obj, NPIdentifier name) if (testIdentifiers[i] == name) return true; } - + return false; } -static bool testGetProperty(NPObject *obj, NPIdentifier name, +static bool testGetProperty(NPObject *obj, NPIdentifier name, NPVariant *variant) { if (name == testIdentifiers[ID_PROPERTY_FOO]) { @@ -151,10 +151,10 @@ static bool testGetProperty(NPObject *obj, NPIdentifier name, static bool testEnumerate(NPObject *npobj, NPIdentifier **value, uint32_t *count) { *count = NUM_TEST_IDENTIFIERS; - + *value = (NPIdentifier*)browser->memalloc(NUM_TEST_IDENTIFIERS * sizeof(NPIdentifier)); memcpy(*value, testIdentifiers, sizeof(NPIdentifier) * NUM_TEST_IDENTIFIERS); - + return true; } diff --git a/webkit/tools/npapi_layout_test_plugin/TestObject.h b/webkit/tools/npapi_layout_test_plugin/TestObject.h index 2babaaf..812603c 100644 --- a/webkit/tools/npapi_layout_test_plugin/TestObject.h +++ b/webkit/tools/npapi_layout_test_plugin/TestObject.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "third_party/npapi/bindings/npapi.h" diff --git a/webkit/tools/npapi_layout_test_plugin/main.cpp b/webkit/tools/npapi_layout_test_plugin/main.cpp index dce0e3d..65426c0 100644 --- a/webkit/tools/npapi_layout_test_plugin/main.cpp +++ b/webkit/tools/npapi_layout_test_plugin/main.cpp @@ -1,33 +1,33 @@ /* IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in - consideration of your agreement to the following terms, and your use, installation, - modification or redistribution of this Apple software constitutes acceptance of these - terms. If you do not agree with these terms, please do not use, install, modify or + consideration of your agreement to the following terms, and your use, installation, + modification or redistribution of this Apple software constitutes acceptance of these + terms. If you do not agree with these terms, please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject to these - terms, Apple grants you a personal, non-exclusive license, under Apple’s copyrights in - this original Apple software (the "Apple Software"), to use, reproduce, modify and - redistribute the Apple Software, with or without modifications, in source and/or binary - forms; provided that if you redistribute the Apple Software in its entirety and without - modifications, you must retain this notice and the following text and disclaimers in all - such redistributions of the Apple Software. Neither the name, trademarks, service marks - or logos of Apple Computer, Inc. may be used to endorse or promote products derived from + + In consideration of your agreement to abide by the following terms, and subject to these + terms, Apple grants you a personal, non-exclusive license, under Apple’s copyrights in + this original Apple software (the "Apple Software"), to use, reproduce, modify and + redistribute the Apple Software, with or without modifications, in source and/or binary + forms; provided that if you redistribute the Apple Software in its entirety and without + modifications, you must retain this notice and the following text and disclaimers in all + such redistributions of the Apple Software. Neither the name, trademarks, service marks + or logos of Apple Computer, Inc. may be used to endorse or promote products derived from the Apple Software without specific prior written permission from Apple. Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by Apple - herein, including but not limited to any patent rights that may be infringed by your + herein, including but not limited to any patent rights that may be infringed by your derivative works or by other works in which the Apple Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, - EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS + + The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, + EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, - REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND - WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR + + IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, + REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND + WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -81,7 +81,7 @@ NPError NPAPI NP_GetEntryPoints(NPPluginFuncs *pluginFuncs) pluginFuncs->urlnotify = NPP_URLNotify; pluginFuncs->getvalue = NPP_GetValue; pluginFuncs->setvalue = NPP_SetValue; - + return NPERR_NO_ERROR; } @@ -93,7 +93,7 @@ NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, ch { if (browser->version >= 14) { PluginObject* obj = (PluginObject*)browser->createobject(instance, getPluginClass()); - + for (int i = 0; i < argc; i++) { if (strcasecmp(argn[i], "onstreamload") == 0 && !obj->onStreamLoad) obj->onStreamLoad = strdup(argv[i]); @@ -104,10 +104,10 @@ NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, ch else if (strcasecmp(argn[i], "logfirstsetwindow") == 0) obj->logSetWindow = TRUE; } - + instance->pdata = obj; } - + // On Windows and Unix, plugins only get events if they are windowless. return browser->setvalue(instance, NPPVpluginWindowBool, NULL); } @@ -141,7 +141,7 @@ NPError NPP_SetWindow(NPP instance, NPWindow *window) if (window->window == NULL) { return NPERR_NO_ERROR; } - + PluginObject* obj = static_cast<PluginObject*>(instance->pdata); if (obj) { @@ -150,7 +150,7 @@ NPError NPP_SetWindow(NPP instance, NPWindow *window) obj->logSetWindow = false; } } - + return NPERR_NO_ERROR; } @@ -220,7 +220,7 @@ int16 NPP_HandleEvent(NPP instance, void *event) PluginObject* obj = static_cast<PluginObject*>(instance->pdata); if (!obj->eventLogging) return 0; - + #ifdef WIN32 // Below is the event handling code. Per the NPAPI spec, the events don't // map directly between operating systems: @@ -268,7 +268,7 @@ int16 NPP_HandleEvent(NPP instance, void *event) printf("PLUGIN: loseFocusEvent\n"); break; default: - printf("PLUGIN: event %d\n", evt->event); + printf("PLUGIN: event %d\n", evt->event); } fflush(stdout); @@ -378,7 +378,7 @@ int16 NPP_HandleEvent(NPP instance, void *event) printf("PLUGIN: event %d\n", evt->what); } #endif - + return 0; } diff --git a/webkit/tools/npapi_layout_test_plugin/resource.h b/webkit/tools/npapi_layout_test_plugin/resource.h index c2bcf92..fe773d32 100644 --- a/webkit/tools/npapi_layout_test_plugin/resource.h +++ b/webkit/tools/npapi_layout_test_plugin/resource.h @@ -3,7 +3,7 @@ // Used by npapi_layout_test_plugin.rc // Next default values for new objects -// +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 101 |