| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 #include "ppapi/proxy/ppb_var_deprecated_proxy.h" | 98 #include "ppapi/proxy/ppb_var_deprecated_proxy.h" |
| 99 #include "ppapi/proxy/ppb_video_capture_proxy.h" | 99 #include "ppapi/proxy/ppb_video_capture_proxy.h" |
| 100 #include "ppapi/proxy/ppb_video_decoder_proxy.h" | 100 #include "ppapi/proxy/ppb_video_decoder_proxy.h" |
| 101 #include "ppapi/proxy/ppp_class_proxy.h" | 101 #include "ppapi/proxy/ppp_class_proxy.h" |
| 102 #include "ppapi/proxy/ppp_graphics_3d_proxy.h" | 102 #include "ppapi/proxy/ppp_graphics_3d_proxy.h" |
| 103 #include "ppapi/proxy/ppp_input_event_proxy.h" | 103 #include "ppapi/proxy/ppp_input_event_proxy.h" |
| 104 #include "ppapi/proxy/ppp_instance_private_proxy.h" | 104 #include "ppapi/proxy/ppp_instance_private_proxy.h" |
| 105 #include "ppapi/proxy/ppp_instance_proxy.h" | 105 #include "ppapi/proxy/ppp_instance_proxy.h" |
| 106 #include "ppapi/proxy/ppp_messaging_proxy.h" | 106 #include "ppapi/proxy/ppp_messaging_proxy.h" |
| 107 #include "ppapi/proxy/ppp_mouse_lock_proxy.h" | 107 #include "ppapi/proxy/ppp_mouse_lock_proxy.h" |
| 108 #include "ppapi/proxy/ppp_printing_proxy.h" |
| 108 #include "ppapi/proxy/ppp_video_decoder_proxy.h" | 109 #include "ppapi/proxy/ppp_video_decoder_proxy.h" |
| 109 #include "ppapi/proxy/resource_creation_proxy.h" | 110 #include "ppapi/proxy/resource_creation_proxy.h" |
| 110 #include "ppapi/shared_impl/ppb_opengles2_shared.h" | 111 #include "ppapi/shared_impl/ppb_opengles2_shared.h" |
| 111 #include "ppapi/shared_impl/ppb_var_shared.h" | 112 #include "ppapi/shared_impl/ppb_var_shared.h" |
| 112 #include "ppapi/thunk/thunk.h" | 113 #include "ppapi/thunk/thunk.h" |
| 113 | 114 |
| 114 // Helper to get the proxy name PPB_Foo_Proxy given the API name PPB_Foo. | 115 // Helper to get the proxy name PPB_Foo_Proxy given the API name PPB_Foo. |
| 115 #define PROXY_CLASS_NAME(api_name) api_name##_Proxy | 116 #define PROXY_CLASS_NAME(api_name) api_name##_Proxy |
| 116 | 117 |
| 117 // Helper to get the interface ID PPB_Foo_Proxy::kApiID given the API | 118 // Helper to get the interface ID PPB_Foo_Proxy::kApiID given the API |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 AddPPB(PPB_PDF_Proxy::GetInfo()); | 209 AddPPB(PPB_PDF_Proxy::GetInfo()); |
| 209 AddPPB(PPB_Testing_Proxy::GetInfo()); | 210 AddPPB(PPB_Testing_Proxy::GetInfo()); |
| 210 AddPPB(PPB_URLLoader_Proxy::GetTrustedInfo()); | 211 AddPPB(PPB_URLLoader_Proxy::GetTrustedInfo()); |
| 211 AddPPB(PPB_Var_Deprecated_Proxy::GetInfo()); | 212 AddPPB(PPB_Var_Deprecated_Proxy::GetInfo()); |
| 212 | 213 |
| 213 // PPP (plugin) interfaces. | 214 // PPP (plugin) interfaces. |
| 214 // TODO(brettw) move these to interface_list*.h | 215 // TODO(brettw) move these to interface_list*.h |
| 215 AddProxy(API_ID_PPP_INSTANCE, &ProxyFactory<PPP_Instance_Proxy>); | 216 AddProxy(API_ID_PPP_INSTANCE, &ProxyFactory<PPP_Instance_Proxy>); |
| 216 AddPPP(PPP_INSTANCE_INTERFACE_1_1, API_ID_PPP_INSTANCE, | 217 AddPPP(PPP_INSTANCE_INTERFACE_1_1, API_ID_PPP_INSTANCE, |
| 217 PPP_Instance_Proxy::GetInstanceInterface()); | 218 PPP_Instance_Proxy::GetInstanceInterface()); |
| 219 AddProxy(API_ID_PPP_PRINTING, &ProxyFactory<PPP_Printing_Proxy>); |
| 220 AddPPP(PPP_PRINTING_DEV_INTERFACE, API_ID_PPP_PRINTING, |
| 221 PPP_Printing_Proxy::GetProxyInterface()); |
| 218 | 222 |
| 219 // Old-style GetInfo PPP interfaces. | 223 // Old-style GetInfo PPP interfaces. |
| 220 // Do not add more stuff here, they should be added to interface_list*.h | 224 // Do not add more stuff here, they should be added to interface_list*.h |
| 221 // TODO(brettw) remove these. | 225 // TODO(brettw) remove these. |
| 222 AddPPP(PPP_Graphics3D_Proxy::GetInfo()); | 226 AddPPP(PPP_Graphics3D_Proxy::GetInfo()); |
| 223 AddPPP(PPP_InputEvent_Proxy::GetInfo()); | 227 AddPPP(PPP_InputEvent_Proxy::GetInfo()); |
| 224 AddPPP(PPP_Instance_Private_Proxy::GetInfo()); | 228 AddPPP(PPP_Instance_Private_Proxy::GetInfo()); |
| 225 AddPPP(PPP_Messaging_Proxy::GetInfo()); | 229 AddPPP(PPP_Messaging_Proxy::GetInfo()); |
| 226 AddPPP(PPP_MouseLock_Proxy::GetInfo()); | 230 AddPPP(PPP_MouseLock_Proxy::GetInfo()); |
| 227 AddPPP(PPP_VideoCapture_Proxy::GetInfo()); | 231 AddPPP(PPP_VideoCapture_Proxy::GetInfo()); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 AddPPB(info->name, info->id, info->interface_ptr); | 365 AddPPB(info->name, info->id, info->interface_ptr); |
| 362 } | 366 } |
| 363 | 367 |
| 364 void InterfaceList::AddPPP(const InterfaceProxy::Info* info) { | 368 void InterfaceList::AddPPP(const InterfaceProxy::Info* info) { |
| 365 AddProxy(info->id, info->create_proxy); | 369 AddProxy(info->id, info->create_proxy); |
| 366 AddPPP(info->name, info->id, info->interface_ptr); | 370 AddPPP(info->name, info->id, info->interface_ptr); |
| 367 } | 371 } |
| 368 | 372 |
| 369 } // namespace proxy | 373 } // namespace proxy |
| 370 } // namespace ppapi | 374 } // namespace ppapi |
| OLD | NEW |