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

Side by Side Diff: webkit/tools/pepper_test_plugin/main.cc

Issue 553050: Windows now uses the TLS API instead of __declspec(thread) for client side co... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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 | Annotate | Revision Log
« gpu/pgl/pgl.cc ('K') | « gpu/pgl/pgl.cc ('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 16 matching lines...) Expand all
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 36
37 #include "gpu/pgl/pgl.h"
38
37 #if defined(INDEPENDENT_PLUGIN) 39 #if defined(INDEPENDENT_PLUGIN)
38 #include <iostream> 40 #include <iostream>
39 #define LOG(x) std::cerr 41 #define LOG(x) std::cerr
40 #else 42 #else
41 #include "base/logging.h" 43 #include "base/logging.h"
42 #include "base/string_util.h" 44 #include "base/string_util.h"
43 #endif 45 #endif
44 #include "webkit/glue/plugins/nphostapi.h" 46 #include "webkit/glue/plugins/nphostapi.h"
45 #include "webkit/tools/pepper_test_plugin/plugin_object.h" 47 #include "webkit/tools/pepper_test_plugin/plugin_object.h"
46 #include "webkit/tools/pepper_test_plugin/event_handler.h" 48 #include "webkit/tools/pepper_test_plugin/event_handler.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 extern "C" { 113 extern "C" {
112 114
113 EXPORT NPError API_CALL NP_Initialize(NPNetscapeFuncs* browser_funcs 115 EXPORT NPError API_CALL NP_Initialize(NPNetscapeFuncs* browser_funcs
114 #if defined(OS_LINUX) 116 #if defined(OS_LINUX)
115 , NPPluginFuncs* plugin_funcs 117 , NPPluginFuncs* plugin_funcs
116 #endif 118 #endif
117 ); 119 );
118 EXPORT NPError API_CALL NP_GetEntryPoints(NPPluginFuncs* plugin_funcs); 120 EXPORT NPError API_CALL NP_GetEntryPoints(NPPluginFuncs* plugin_funcs);
119 121
120 EXPORT void API_CALL NP_Shutdown() { 122 EXPORT void API_CALL NP_Shutdown() {
123 #if !defined(INDEPENDENT_PLUGIN)
124 pglTerminate();
125 #endif
121 } 126 }
122 127
123 #if defined(OS_LINUX) 128 #if defined(OS_LINUX)
124 EXPORT NPError API_CALL NP_GetValue(NPP instance, 129 EXPORT NPError API_CALL NP_GetValue(NPP instance,
125 NPPVariable variable, 130 NPPVariable variable,
126 void* value); 131 void* value);
127 EXPORT const char* API_CALL NP_GetMIMEDescription(); 132 EXPORT const char* API_CALL NP_GetMIMEDescription();
128 #endif 133 #endif
129 134
130 } // extern "C" 135 } // extern "C"
131 136
132 // Plugin entry points 137 // Plugin entry points
133 EXPORT NPError API_CALL NP_Initialize(NPNetscapeFuncs* browser_funcs 138 EXPORT NPError API_CALL NP_Initialize(NPNetscapeFuncs* browser_funcs
134 #if defined(OS_LINUX) 139 #if defined(OS_LINUX)
135 , NPPluginFuncs* plugin_funcs 140 , NPPluginFuncs* plugin_funcs
136 #endif 141 #endif
137 ) { 142 ) {
138 browser = browser_funcs; 143 browser = browser_funcs;
144 #if !defined(INDEPENDENT_PLUGIN)
145 pglInitialize();
146 #endif
139 #if defined(OS_LINUX) 147 #if defined(OS_LINUX)
140 return NP_GetEntryPoints(plugin_funcs); 148 return NP_GetEntryPoints(plugin_funcs);
141 #else 149 #else
142 return NPERR_NO_ERROR; 150 return NPERR_NO_ERROR;
143 #endif 151 #endif
144 } 152 }
145 153
146 // Entrypoints ----------------------------------------------------------------- 154 // Entrypoints -----------------------------------------------------------------
147 155
148 NPError API_CALL NP_GetEntryPoints(NPPluginFuncs* plugin_funcs) { 156 NPError API_CALL NP_GetEntryPoints(NPPluginFuncs* plugin_funcs) {
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 284
277 #if defined(OS_LINUX) 285 #if defined(OS_LINUX)
278 NPError API_CALL NP_GetValue(NPP instance, NPPVariable variable, void* value) { 286 NPError API_CALL NP_GetValue(NPP instance, NPPVariable variable, void* value) {
279 return NPP_GetValue(instance, variable, value); 287 return NPP_GetValue(instance, variable, value);
280 } 288 }
281 289
282 const char* API_CALL NP_GetMIMEDescription() { 290 const char* API_CALL NP_GetMIMEDescription() {
283 return "pepper-application/x-pepper-test-plugin::Pepper Test"; 291 return "pepper-application/x-pepper-test-plugin::Pepper Test";
284 } 292 }
285 #endif 293 #endif
OLDNEW
« gpu/pgl/pgl.cc ('K') | « gpu/pgl/pgl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698