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

Side by Side Diff: ppapi/native_client/src/shared/ppapi_proxy/browser_ppp.cc

Issue 10290006: Update gl2.h and gl2ext.h headers from Khronos. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "native_client/src/shared/ppapi_proxy/browser_ppp.h" 5 #include "native_client/src/shared/ppapi_proxy/browser_ppp.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "native_client/src/include/nacl_scoped_ptr.h" 9 #include "native_client/src/include/nacl_scoped_ptr.h"
10 #include "native_client/src/include/portability.h" 10 #include "native_client/src/include/portability.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 is_nexe_alive_ = (srpc_result != NACL_SRPC_RESULT_INTERNAL); 162 is_nexe_alive_ = (srpc_result != NACL_SRPC_RESULT_INTERNAL);
163 163
164 // Special case PPP_Instance versioning. The plugin side of the proxy 164 // Special case PPP_Instance versioning. The plugin side of the proxy
165 // converts Instance 1.1 to Instance 1.0 as needed, so we want to say here 165 // converts Instance 1.1 to Instance 1.0 as needed, so we want to say here
166 // in the browser side that any time either 1.0 or 1.1 is supported, that 166 // in the browser side that any time either 1.0 or 1.1 is supported, that
167 // we'll support 1.1. 167 // we'll support 1.1.
168 if (srpc_result == NACL_SRPC_RESULT_OK && !exports_interface_name && 168 if (srpc_result == NACL_SRPC_RESULT_OK && !exports_interface_name &&
169 strcmp(interface_name, PPP_INSTANCE_INTERFACE_1_1) == 0) { 169 strcmp(interface_name, PPP_INSTANCE_INTERFACE_1_1) == 0) {
170 srpc_result = 170 srpc_result =
171 PppRpcClient::PPP_GetInterface(main_channel_, 171 PppRpcClient::PPP_GetInterface(main_channel_,
172 PPP_INSTANCE_INTERFACE_1_0, 172 const_cast<char *>(PPP_INSTANCE_INTERFACE_1_0),
173 &exports_interface_name); 173 &exports_interface_name);
174 } 174 }
175 175
176 const void* ppp_interface = NULL; 176 const void* ppp_interface = NULL;
177 if (srpc_result != NACL_SRPC_RESULT_OK || !exports_interface_name) { 177 if (srpc_result != NACL_SRPC_RESULT_OK || !exports_interface_name) {
178 ppp_interface = NULL; 178 ppp_interface = NULL;
179 } else if (strcmp(interface_name, PPP_INSTANCE_INTERFACE) == 0) { 179 } else if (strcmp(interface_name, PPP_INSTANCE_INTERFACE) == 0) {
180 ppp_interface = 180 ppp_interface =
181 reinterpret_cast<const void*>(BrowserInstance::GetInterface()); 181 reinterpret_cast<const void*>(BrowserInstance::GetInterface());
182 } else if (strcmp(interface_name, PPP_MESSAGING_INTERFACE) == 0) { 182 } else if (strcmp(interface_name, PPP_MESSAGING_INTERFACE) == 0) {
183 ppp_interface = 183 ppp_interface =
(...skipping 30 matching lines...) Expand all
214 214
215 const void* BrowserPpp::GetPluginInterfaceSafe(const char* interface_name) { 215 const void* BrowserPpp::GetPluginInterfaceSafe(const char* interface_name) {
216 const void* ppp_interface = GetPluginInterface(interface_name); 216 const void* ppp_interface = GetPluginInterface(interface_name);
217 if (ppp_interface == NULL) 217 if (ppp_interface == NULL)
218 DebugPrintf("PPB_GetInterface: %s not found\n", interface_name); 218 DebugPrintf("PPB_GetInterface: %s not found\n", interface_name);
219 CHECK(ppp_interface != NULL); 219 CHECK(ppp_interface != NULL);
220 return ppp_interface; 220 return ppp_interface;
221 } 221 }
222 222
223 } // namespace ppapi_proxy 223 } // namespace ppapi_proxy
OLDNEW
« no previous file with comments | « ppapi/native_client/src/shared/ppapi/nacl.scons ('k') | ppapi/native_client/tests/ppapi/nacl.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698