Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(402)

Side by Side Diff: webkit/tools/npapi_layout_test_plugin/main.cpp

Issue 2505001: Fix more type issues from the npapi.h tranisition to *_t types (Closed)
Patch Set: scaled back Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webkit/tools/npapi_layout_test_plugin/TestObject.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Ap ple") in 2 IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Ap ple") in
3 consideration of your agreement to the following terms, and your use, installat ion, 3 consideration of your agreement to the following terms, and your use, installat ion,
4 modification or redistribution of this Apple software constitutes acceptance of these 4 modification or redistribution of this Apple software constitutes acceptance of these
5 terms. If you do not agree with these terms, please do not use, install, modif y or 5 terms. If you do not agree with these terms, please do not use, install, modif y or
6 redistribute this Apple software. 6 redistribute this Apple software.
7 7
8 In consideration of your agreement to abide by the following terms, and subject to these 8 In consideration of your agreement to abide by the following terms, and subject to these
9 terms, Apple grants you a personal, non-exclusive license, under Apple’s copyri ghts in 9 terms, Apple grants you a personal, non-exclusive license, under Apple’s copyri ghts in
10 this original Apple software (the "Apple Software"), to use, reproduce, modify and 10 this original Apple software (the "Apple Software"), to use, reproduce, modify and
(...skipping 15 matching lines...) Expand all
26 IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONS EQUENTIAL 26 IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONS EQUENTIAL
27 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERV ICES; LOSS 27 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERV ICES; LOSS
28 OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, 28 OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
29 REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER C AUSED AND 29 REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER C AUSED AND
30 WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR 30 WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR
31 OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 */ 32 */
33 33
34 #include <stdlib.h> 34 #include <stdlib.h>
35 #include <stdio.h> 35 #include <stdio.h>
36 #include <string.h>
36 #include <wtf/Platform.h> 37 #include <wtf/Platform.h>
37 #include "PluginObject.h" 38 #include "PluginObject.h"
38 39
39 #ifdef WIN32 40 #ifdef WIN32
40 #define strcasecmp _stricmp 41 #define strcasecmp _stricmp
41 #define NPAPI WINAPI 42 #define NPAPI WINAPI
42 #else 43 #else
43 #define NPAPI 44 #define NPAPI
44 #endif 45 #endif
45 46
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 105
105 return NPERR_NO_ERROR; 106 return NPERR_NO_ERROR;
106 } 107 }
107 108
108 EXPORT void NPAPI NP_Shutdown(void) 109 EXPORT void NPAPI NP_Shutdown(void)
109 { 110 {
110 } 111 }
111 112
112 static void executeScript(const PluginObject* obj, const char* script); 113 static void executeScript(const PluginObject* obj, const char* script);
113 114
114 NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16_t argc, char *argn[], char *argv[], NPSavedData *saved) 115 NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc , char *argn[], char *argv[], NPSavedData *saved)
115 { 116 {
116 if (browser->version >= 14) { 117 if (browser->version >= 14) {
117 PluginObject* obj = (PluginObject*)browser->createobject(instance, getPl uginClass()); 118 PluginObject* obj = (PluginObject*)browser->createobject(instance, getPl uginClass());
118 119
119 for (int i = 0; i < argc; i++) { 120 for (int i = 0; i < argc; i++) {
120 if (strcasecmp(argn[i], "onstreamload") == 0 && !obj->onStreamLoad) 121 if (strcasecmp(argn[i], "onstreamload") == 0 && !obj->onStreamLoad)
121 obj->onStreamLoad = strdup(argv[i]); 122 obj->onStreamLoad = strdup(argv[i]);
122 else if (strcasecmp(argn[i], "onStreamDestroy") == 0 && !obj->onStre amDestroy) 123 else if (strcasecmp(argn[i], "onStreamDestroy") == 0 && !obj->onStre amDestroy)
123 obj->onStreamDestroy = strdup(argv[i]); 124 obj->onStreamDestroy = strdup(argv[i]);
124 else if (strcasecmp(argn[i], "onURLNotify") == 0 && !obj->onURLNotif y) 125 else if (strcasecmp(argn[i], "onURLNotify") == 0 && !obj->onURLNotif y)
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 208
208 NPString npScript; 209 NPString npScript;
209 npScript.UTF8Characters = script; 210 npScript.UTF8Characters = script;
210 npScript.UTF8Length = strlen(script); 211 npScript.UTF8Length = strlen(script);
211 212
212 NPVariant browserResult; 213 NPVariant browserResult;
213 browser->evaluate(obj->npp, windowScriptObject, &npScript, &browserResult); 214 browser->evaluate(obj->npp, windowScriptObject, &npScript, &browserResult);
214 browser->releasevariantvalue(&browserResult); 215 browser->releasevariantvalue(&browserResult);
215 } 216 }
216 217
217 NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream *stream, NPBool se ekable, uint16 *stype) 218 NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream *stream, NPBool se ekable, uint16_t *stype)
218 { 219 {
219 PluginObject* obj = static_cast<PluginObject*>(instance->pdata); 220 PluginObject* obj = static_cast<PluginObject*>(instance->pdata);
220 221
221 if (obj->returnErrorFromNewStream) 222 if (obj->returnErrorFromNewStream)
222 return NPERR_GENERIC_ERROR; 223 return NPERR_GENERIC_ERROR;
223 224
224 obj->stream = stream; 225 obj->stream = stream;
225 *stype = NP_ASFILEONLY; 226 *stype = NP_ASFILEONLY;
226 227
227 if (browser->version >= NPVERS_HAS_RESPONSE_HEADERS) 228 if (browser->version >= NPVERS_HAS_RESPONSE_HEADERS)
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 EXPORT const char* NPAPI NP_GetMIMEDescription(void) { 496 EXPORT const char* NPAPI NP_GetMIMEDescription(void) {
496 // The layout test LayoutTests/fast/js/navigator-mimeTypes-length.html 497 // The layout test LayoutTests/fast/js/navigator-mimeTypes-length.html
497 // asserts that the number of mimetypes handled by plugins should be 498 // asserts that the number of mimetypes handled by plugins should be
498 // greater than the number of plugins. This isn't true if we're 499 // greater than the number of plugins. This isn't true if we're
499 // the only plugin and we only handle one mimetype, so specify 500 // the only plugin and we only handle one mimetype, so specify
500 // multiple mimetypes here. 501 // multiple mimetypes here.
501 return "application/x-webkit-test-netscape:testnetscape:test netscape conten t;" 502 return "application/x-webkit-test-netscape:testnetscape:test netscape conten t;"
502 "application/x-webkit-test-netscape2:testnetscape2:test netscape cont ent2"; 503 "application/x-webkit-test-netscape2:testnetscape2:test netscape cont ent2";
503 } 504 }
504 #endif 505 #endif
OLDNEW
« no previous file with comments | « webkit/tools/npapi_layout_test_plugin/TestObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698