OLD | NEW |
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_globals.h" | 5 #include "native_client/src/shared/ppapi_proxy/browser_globals.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdio.h> | 8 #include <stdio.h> |
9 #include <stdlib.h> | 9 #include <stdlib.h> |
10 #include <string.h> | 10 #include <string.h> |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 // If dev interface is not enabled, reject interfaces containing "(Dev)" | 199 // If dev interface is not enabled, reject interfaces containing "(Dev)" |
200 if (!enable_dev_interfaces && strstr(interface_name, "(Dev)") != NULL) { | 200 if (!enable_dev_interfaces && strstr(interface_name, "(Dev)") != NULL) { |
201 return NULL; | 201 return NULL; |
202 } | 202 } |
203 if (!enable_3d_interfaces) { | 203 if (!enable_3d_interfaces) { |
204 static const char* disabled_interface_names[] = { | 204 static const char* disabled_interface_names[] = { |
205 PPB_GRAPHICS_3D_INTERFACE, | 205 PPB_GRAPHICS_3D_INTERFACE, |
206 PPB_GRAPHICS_3D_TRUSTED_INTERFACE, | 206 PPB_GRAPHICS_3D_TRUSTED_INTERFACE, |
207 PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_INTERFACE, | 207 PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_INTERFACE, |
208 PPB_OPENGLES2_INTERFACE, | 208 PPB_OPENGLES2_INTERFACE, |
209 PPB_OPENGLES2_INSTANCEDARRAYS_DEV_INTERFACE, | 209 PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE, |
210 PPB_OPENGLES2_FRAMEBUFFERBLIT_DEV_INTERFACE, | 210 PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE, |
211 PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_DEV_INTERFACE, | 211 PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE, |
212 PPB_OPENGLES2_CHROMIUMENABLEFEATURE_DEV_INTERFACE, | 212 PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE, |
213 PPB_OPENGLES2_CHROMIUMMAPSUB_DEV_INTERFACE, | 213 PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE, |
214 PPB_OPENGLES2_QUERY_DEV_INTERFACE, | 214 PPB_OPENGLES2_QUERY_INTERFACE, |
215 PPB_LAYER_COMPOSITOR_DEV_INTERFACE | 215 PPB_LAYER_COMPOSITOR_DEV_INTERFACE |
216 }; | 216 }; |
217 for (size_t i = 0; i < NACL_ARRAY_SIZE(disabled_interface_names); i++) { | 217 for (size_t i = 0; i < NACL_ARRAY_SIZE(disabled_interface_names); i++) { |
218 if (strcmp(interface_name, disabled_interface_names[i]) == 0) | 218 if (strcmp(interface_name, disabled_interface_names[i]) == 0) |
219 return NULL; | 219 return NULL; |
220 } | 220 } |
221 } | 221 } |
222 return (*get_interface)(interface_name); | 222 return (*get_interface)(interface_name); |
223 } | 223 } |
224 | 224 |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 } | 491 } |
492 | 492 |
493 const PPB_UDPSocket_Private* PPBUDPSocketPrivateInterface() { | 493 const PPB_UDPSocket_Private* PPBUDPSocketPrivateInterface() { |
494 static const PPB_UDPSocket_Private* ppb = | 494 static const PPB_UDPSocket_Private* ppb = |
495 static_cast<const PPB_UDPSocket_Private*>( | 495 static_cast<const PPB_UDPSocket_Private*>( |
496 GetBrowserInterfaceSafe(PPB_UDPSOCKET_PRIVATE_INTERFACE)); | 496 GetBrowserInterfaceSafe(PPB_UDPSOCKET_PRIVATE_INTERFACE)); |
497 return ppb; | 497 return ppb; |
498 } | 498 } |
499 | 499 |
500 } // namespace ppapi_proxy | 500 } // namespace ppapi_proxy |
OLD | NEW |