| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 #include "ppapi/proxy/ppp_class_proxy.h" | 87 #include "ppapi/proxy/ppp_class_proxy.h" |
| 88 #include "ppapi/proxy/ppp_graphics_3d_proxy.h" | 88 #include "ppapi/proxy/ppp_graphics_3d_proxy.h" |
| 89 #include "ppapi/proxy/ppp_input_event_proxy.h" | 89 #include "ppapi/proxy/ppp_input_event_proxy.h" |
| 90 #include "ppapi/proxy/ppp_instance_private_proxy.h" | 90 #include "ppapi/proxy/ppp_instance_private_proxy.h" |
| 91 #include "ppapi/proxy/ppp_instance_proxy.h" | 91 #include "ppapi/proxy/ppp_instance_proxy.h" |
| 92 #include "ppapi/proxy/ppp_messaging_proxy.h" | 92 #include "ppapi/proxy/ppp_messaging_proxy.h" |
| 93 #include "ppapi/proxy/ppp_mouse_lock_proxy.h" | 93 #include "ppapi/proxy/ppp_mouse_lock_proxy.h" |
| 94 #include "ppapi/proxy/ppp_video_decoder_proxy.h" | 94 #include "ppapi/proxy/ppp_video_decoder_proxy.h" |
| 95 #include "ppapi/proxy/resource_creation_proxy.h" | 95 #include "ppapi/proxy/resource_creation_proxy.h" |
| 96 #include "ppapi/shared_impl/ppb_opengles2_shared.h" | 96 #include "ppapi/shared_impl/ppb_opengles2_shared.h" |
| 97 #include "ppapi/shared_impl/ppb_var_impl.h" | 97 #include "ppapi/shared_impl/ppb_var_shared.h" |
| 98 #include "ppapi/thunk/thunk.h" | 98 #include "ppapi/thunk/thunk.h" |
| 99 | 99 |
| 100 // Helper to get the proxy name PPB_Foo_Proxy given the API name PPB_Foo. | 100 // Helper to get the proxy name PPB_Foo_Proxy given the API name PPB_Foo. |
| 101 #define PROXY_CLASS_NAME(api_name) api_name##_Proxy | 101 #define PROXY_CLASS_NAME(api_name) api_name##_Proxy |
| 102 | 102 |
| 103 // Helper to get the interface ID PPB_Foo_Proxy::kApiID given the API | 103 // Helper to get the interface ID PPB_Foo_Proxy::kApiID given the API |
| 104 // name PPB_Foo. | 104 // name PPB_Foo. |
| 105 #define PROXY_API_ID(api_name) PROXY_CLASS_NAME(api_name)::kApiID | 105 #define PROXY_API_ID(api_name) PROXY_CLASS_NAME(api_name)::kApiID |
| 106 | 106 |
| 107 // Helper to get the name of the templatized factory function. | 107 // Helper to get the name of the templatized factory function. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 // that they support, so aren't covered by the macros above, but have proxies | 159 // that they support, so aren't covered by the macros above, but have proxies |
| 160 // for message routing. Others have different implementations between the | 160 // for message routing. Others have different implementations between the |
| 161 // proxy and the impl and there's no obvious message routing. | 161 // proxy and the impl and there's no obvious message routing. |
| 162 AddProxy(API_ID_RESOURCE_CREATION, &ResourceCreationProxy::Create); | 162 AddProxy(API_ID_RESOURCE_CREATION, &ResourceCreationProxy::Create); |
| 163 AddProxy(API_ID_PPP_CLASS, &PPP_Class_Proxy::Create); | 163 AddProxy(API_ID_PPP_CLASS, &PPP_Class_Proxy::Create); |
| 164 AddPPB(PPB_CORE_INTERFACE, API_ID_PPB_CORE, | 164 AddPPB(PPB_CORE_INTERFACE, API_ID_PPB_CORE, |
| 165 PPB_Core_Proxy::GetPPB_Core_Interface()); | 165 PPB_Core_Proxy::GetPPB_Core_Interface()); |
| 166 AddPPB(PPB_OPENGLES2_INTERFACE, API_ID_NONE, | 166 AddPPB(PPB_OPENGLES2_INTERFACE, API_ID_NONE, |
| 167 PPB_OpenGLES2_Shared::GetInterface()); | 167 PPB_OpenGLES2_Shared::GetInterface()); |
| 168 AddPPB(PPB_VAR_INTERFACE, API_ID_NONE, | 168 AddPPB(PPB_VAR_INTERFACE, API_ID_NONE, |
| 169 PPB_Var_Impl::GetVarInterface()); | 169 PPB_Var_Shared::GetVarInterface()); |
| 170 AddPPB(PPB_VAR_INTERFACE_1_0, API_ID_NONE, | 170 AddPPB(PPB_VAR_INTERFACE_1_0, API_ID_NONE, |
| 171 PPB_Var_Impl::GetVarInterface1_0()); | 171 PPB_Var_Shared::GetVarInterface1_0()); |
| 172 | 172 |
| 173 AddFlashInterfaces(); | 173 AddFlashInterfaces(); |
| 174 | 174 |
| 175 // PPB (browser) interfaces. | 175 // PPB (browser) interfaces. |
| 176 // Do not add more stuff here, they should be added to interface_list*.h | 176 // Do not add more stuff here, they should be added to interface_list*.h |
| 177 // TODO(brettw) remove these. | 177 // TODO(brettw) remove these. |
| 178 AddPPB(PPB_FileChooser_Proxy::GetTrustedInfo()); | 178 AddPPB(PPB_FileChooser_Proxy::GetTrustedInfo()); |
| 179 AddPPB(PPB_Instance_Proxy::GetInfoPrivate()); | 179 AddPPB(PPB_Instance_Proxy::GetInfoPrivate()); |
| 180 AddPPB(PPB_PDF_Proxy::GetInfo()); | 180 AddPPB(PPB_PDF_Proxy::GetInfo()); |
| 181 AddPPB(PPB_Testing_Proxy::GetInfo()); | 181 AddPPB(PPB_Testing_Proxy::GetInfo()); |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 AddPPB(info->name, info->id, info->interface_ptr); | 317 AddPPB(info->name, info->id, info->interface_ptr); |
| 318 } | 318 } |
| 319 | 319 |
| 320 void InterfaceList::AddPPP(const InterfaceProxy::Info* info) { | 320 void InterfaceList::AddPPP(const InterfaceProxy::Info* info) { |
| 321 AddProxy(info->id, info->create_proxy); | 321 AddProxy(info->id, info->create_proxy); |
| 322 AddPPP(info->name, info->id, info->interface_ptr); | 322 AddPPP(info->name, info->id, info->interface_ptr); |
| 323 } | 323 } |
| 324 | 324 |
| 325 } // namespace proxy | 325 } // namespace proxy |
| 326 } // namespace ppapi | 326 } // namespace ppapi |
| OLD | NEW |