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 "ppapi/proxy/interface_list.h" | 5 #include "ppapi/proxy/interface_list.h" |
6 | 6 |
7 #include "base/memory/singleton.h" | 7 #include "base/memory/singleton.h" |
8 #include "ppapi/c/dev/ppb_audio_input_dev.h" | 8 #include "ppapi/c/dev/ppb_audio_input_dev.h" |
9 #include "ppapi/c/dev/ppb_buffer_dev.h" | 9 #include "ppapi/c/dev/ppb_buffer_dev.h" |
10 #include "ppapi/c/dev/ppb_char_set_dev.h" | 10 #include "ppapi/c/dev/ppb_char_set_dev.h" |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 // Manually add some special proxies. Some of these don't have interfaces | 187 // Manually add some special proxies. Some of these don't have interfaces |
188 // that they support, so aren't covered by the macros above, but have proxies | 188 // that they support, so aren't covered by the macros above, but have proxies |
189 // for message routing. Others have different implementations between the | 189 // for message routing. Others have different implementations between the |
190 // proxy and the impl and there's no obvious message routing. | 190 // proxy and the impl and there's no obvious message routing. |
191 AddProxy(API_ID_RESOURCE_CREATION, &ResourceCreationProxy::Create); | 191 AddProxy(API_ID_RESOURCE_CREATION, &ResourceCreationProxy::Create); |
192 AddProxy(API_ID_PPP_CLASS, &PPP_Class_Proxy::Create); | 192 AddProxy(API_ID_PPP_CLASS, &PPP_Class_Proxy::Create); |
193 AddPPB(PPB_CORE_INTERFACE_1_0, API_ID_PPB_CORE, | 193 AddPPB(PPB_CORE_INTERFACE_1_0, API_ID_PPB_CORE, |
194 PPB_Core_Proxy::GetPPB_Core_Interface()); | 194 PPB_Core_Proxy::GetPPB_Core_Interface()); |
195 AddPPB(PPB_MESSAGELOOP_DEV_INTERFACE_0_1, API_ID_NONE, | 195 AddPPB(PPB_MESSAGELOOP_DEV_INTERFACE_0_1, API_ID_NONE, |
196 PPB_MessageLoop_Proxy::GetInterface()); | 196 PPB_MessageLoop_Proxy::GetInterface()); |
197 #if !defined(OS_NACL) | |
198 AddPPB(PPB_OPENGLES2_INTERFACE_1_0, API_ID_NONE, | 197 AddPPB(PPB_OPENGLES2_INTERFACE_1_0, API_ID_NONE, |
199 PPB_OpenGLES2_Shared::GetInterface()); | 198 PPB_OpenGLES2_Shared::GetInterface()); |
200 AddPPB(PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE_1_0, API_ID_NONE, | 199 AddPPB(PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE_1_0, API_ID_NONE, |
201 PPB_OpenGLES2_Shared::GetInstancedArraysInterface()); | 200 PPB_OpenGLES2_Shared::GetInstancedArraysInterface()); |
202 AddPPB(PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE_1_0, API_ID_NONE, | 201 AddPPB(PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE_1_0, API_ID_NONE, |
203 PPB_OpenGLES2_Shared::GetFramebufferBlitInterface()); | 202 PPB_OpenGLES2_Shared::GetFramebufferBlitInterface()); |
204 AddPPB(PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE_1_0, API_ID_NONE, | 203 AddPPB(PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE_1_0, API_ID_NONE, |
205 PPB_OpenGLES2_Shared::GetFramebufferMultisampleInterface()); | 204 PPB_OpenGLES2_Shared::GetFramebufferMultisampleInterface()); |
206 AddPPB(PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE_1_0, API_ID_NONE, | 205 AddPPB(PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE_1_0, API_ID_NONE, |
207 PPB_OpenGLES2_Shared::GetChromiumEnableFeatureInterface()); | 206 PPB_OpenGLES2_Shared::GetChromiumEnableFeatureInterface()); |
208 AddPPB(PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE_1_0, API_ID_NONE, | 207 AddPPB(PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE_1_0, API_ID_NONE, |
209 PPB_OpenGLES2_Shared::GetChromiumMapSubInterface()); | 208 PPB_OpenGLES2_Shared::GetChromiumMapSubInterface()); |
210 AddPPB(PPB_OPENGLES2_CHROMIUMMAPSUB_DEV_INTERFACE_1_0, API_ID_NONE, | 209 AddPPB(PPB_OPENGLES2_CHROMIUMMAPSUB_DEV_INTERFACE_1_0, API_ID_NONE, |
211 PPB_OpenGLES2_Shared::GetChromiumMapSubInterface()); | 210 PPB_OpenGLES2_Shared::GetChromiumMapSubInterface()); |
212 AddPPB(PPB_OPENGLES2_QUERY_INTERFACE_1_0, API_ID_NONE, | 211 AddPPB(PPB_OPENGLES2_QUERY_INTERFACE_1_0, API_ID_NONE, |
213 PPB_OpenGLES2_Shared::GetQueryInterface()); | 212 PPB_OpenGLES2_Shared::GetQueryInterface()); |
| 213 #if !defined(OS_NACL) |
214 AddPPB(PPB_FLASH_PRINT_INTERFACE_1_0, API_ID_PPB_FLASH, | 214 AddPPB(PPB_FLASH_PRINT_INTERFACE_1_0, API_ID_PPB_FLASH, |
215 PPB_Flash_Proxy::GetFlashPrintInterface()); | 215 PPB_Flash_Proxy::GetFlashPrintInterface()); |
216 #endif | 216 #endif |
217 AddPPB(PPB_VAR_ARRAY_BUFFER_INTERFACE_1_0, API_ID_NONE, | 217 AddPPB(PPB_VAR_ARRAY_BUFFER_INTERFACE_1_0, API_ID_NONE, |
218 PPB_Var_Shared::GetVarArrayBufferInterface1_0()); | 218 PPB_Var_Shared::GetVarArrayBufferInterface1_0()); |
219 AddPPB(PPB_VAR_INTERFACE_1_1, API_ID_NONE, | 219 AddPPB(PPB_VAR_INTERFACE_1_1, API_ID_NONE, |
220 PPB_Var_Shared::GetVarInterface1_1()); | 220 PPB_Var_Shared::GetVarInterface1_1()); |
221 AddPPB(PPB_VAR_INTERFACE_1_0, API_ID_NONE, | 221 AddPPB(PPB_VAR_INTERFACE_1_0, API_ID_NONE, |
222 PPB_Var_Shared::GetVarInterface1_0()); | 222 PPB_Var_Shared::GetVarInterface1_0()); |
223 | 223 |
(...skipping 19 matching lines...) Expand all Loading... |
243 AddProxy(API_ID_PPP_TEXT_INPUT, &ProxyFactory<PPP_TextInput_Proxy>); | 243 AddProxy(API_ID_PPP_TEXT_INPUT, &ProxyFactory<PPP_TextInput_Proxy>); |
244 AddPPP(PPP_TEXTINPUT_DEV_INTERFACE, API_ID_PPP_TEXT_INPUT, | 244 AddPPP(PPP_TEXTINPUT_DEV_INTERFACE, API_ID_PPP_TEXT_INPUT, |
245 PPP_TextInput_Proxy::GetProxyInterface()); | 245 PPP_TextInput_Proxy::GetProxyInterface()); |
246 | 246 |
247 // Old-style GetInfo PPP interfaces. | 247 // Old-style GetInfo PPP interfaces. |
248 // Do not add more stuff here, they should be added to interface_list*.h | 248 // Do not add more stuff here, they should be added to interface_list*.h |
249 // TODO(brettw) remove these. | 249 // TODO(brettw) remove these. |
250 AddPPP(PPP_InputEvent_Proxy::GetInfo()); | 250 AddPPP(PPP_InputEvent_Proxy::GetInfo()); |
251 AddPPP(PPP_Messaging_Proxy::GetInfo()); | 251 AddPPP(PPP_Messaging_Proxy::GetInfo()); |
252 AddPPP(PPP_MouseLock_Proxy::GetInfo()); | 252 AddPPP(PPP_MouseLock_Proxy::GetInfo()); |
| 253 AddPPP(PPP_Graphics3D_Proxy::GetInfo()); |
253 #if !defined(OS_NACL) | 254 #if !defined(OS_NACL) |
254 AddPPP(PPP_Graphics3D_Proxy::GetInfo()); | |
255 AddPPP(PPP_Instance_Private_Proxy::GetInfo()); | 255 AddPPP(PPP_Instance_Private_Proxy::GetInfo()); |
256 AddPPP(PPP_VideoCapture_Proxy::GetInfo()); | 256 AddPPP(PPP_VideoCapture_Proxy::GetInfo()); |
257 AddPPP(PPP_VideoDecoder_Proxy::GetInfo()); | 257 AddPPP(PPP_VideoDecoder_Proxy::GetInfo()); |
258 #endif | 258 #endif |
259 } | 259 } |
260 | 260 |
261 InterfaceList::~InterfaceList() { | 261 InterfaceList::~InterfaceList() { |
262 } | 262 } |
263 | 263 |
264 // static | 264 // static |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 AddPPB(info->name, info->id, info->interface_ptr); | 341 AddPPB(info->name, info->id, info->interface_ptr); |
342 } | 342 } |
343 | 343 |
344 void InterfaceList::AddPPP(const InterfaceProxy::Info* info) { | 344 void InterfaceList::AddPPP(const InterfaceProxy::Info* info) { |
345 AddProxy(info->id, info->create_proxy); | 345 AddProxy(info->id, info->create_proxy); |
346 AddPPP(info->name, info->id, info->interface_ptr); | 346 AddPPP(info->name, info->id, info->interface_ptr); |
347 } | 347 } |
348 | 348 |
349 } // namespace proxy | 349 } // namespace proxy |
350 } // namespace ppapi | 350 } // namespace ppapi |
OLD | NEW |