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/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
9 #include "ppapi/c/dev/ppb_audio_input_dev.h" | 9 #include "ppapi/c/dev/ppb_audio_input_dev.h" |
10 #include "ppapi/c/dev/ppb_buffer_dev.h" | 10 #include "ppapi/c/dev/ppb_buffer_dev.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 #include "ppapi/proxy/ppb_file_ref_proxy.h" | 96 #include "ppapi/proxy/ppb_file_ref_proxy.h" |
97 #include "ppapi/proxy/ppb_flash_message_loop_proxy.h" | 97 #include "ppapi/proxy/ppb_flash_message_loop_proxy.h" |
98 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" | 98 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" |
99 #include "ppapi/proxy/ppb_image_data_proxy.h" | 99 #include "ppapi/proxy/ppb_image_data_proxy.h" |
100 #include "ppapi/proxy/ppb_instance_proxy.h" | 100 #include "ppapi/proxy/ppb_instance_proxy.h" |
101 #include "ppapi/proxy/ppb_message_loop_proxy.h" | 101 #include "ppapi/proxy/ppb_message_loop_proxy.h" |
102 #include "ppapi/proxy/ppb_network_monitor_private_proxy.h" | 102 #include "ppapi/proxy/ppb_network_monitor_private_proxy.h" |
103 #include "ppapi/proxy/ppb_tcp_server_socket_private_proxy.h" | 103 #include "ppapi/proxy/ppb_tcp_server_socket_private_proxy.h" |
104 #include "ppapi/proxy/ppb_tcp_socket_private_proxy.h" | 104 #include "ppapi/proxy/ppb_tcp_socket_private_proxy.h" |
105 #include "ppapi/proxy/ppb_testing_proxy.h" | 105 #include "ppapi/proxy/ppb_testing_proxy.h" |
106 #include "ppapi/proxy/ppb_url_loader_proxy.h" | |
107 #include "ppapi/proxy/ppb_var_deprecated_proxy.h" | 106 #include "ppapi/proxy/ppb_var_deprecated_proxy.h" |
108 #include "ppapi/proxy/ppb_video_decoder_proxy.h" | 107 #include "ppapi/proxy/ppb_video_decoder_proxy.h" |
109 #include "ppapi/proxy/ppb_x509_certificate_private_proxy.h" | 108 #include "ppapi/proxy/ppb_x509_certificate_private_proxy.h" |
110 #include "ppapi/proxy/ppp_class_proxy.h" | 109 #include "ppapi/proxy/ppp_class_proxy.h" |
111 #include "ppapi/proxy/ppp_content_decryptor_private_proxy.h" | 110 #include "ppapi/proxy/ppp_content_decryptor_private_proxy.h" |
112 #include "ppapi/proxy/ppp_graphics_3d_proxy.h" | 111 #include "ppapi/proxy/ppp_graphics_3d_proxy.h" |
113 #include "ppapi/proxy/ppp_input_event_proxy.h" | 112 #include "ppapi/proxy/ppp_input_event_proxy.h" |
114 #include "ppapi/proxy/ppp_instance_private_proxy.h" | 113 #include "ppapi/proxy/ppp_instance_private_proxy.h" |
115 #include "ppapi/proxy/ppp_instance_proxy.h" | 114 #include "ppapi/proxy/ppp_instance_proxy.h" |
116 #include "ppapi/proxy/ppp_messaging_proxy.h" | 115 #include "ppapi/proxy/ppp_messaging_proxy.h" |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 AddPPB(PPB_VAR_INTERFACE_1_1, API_ID_NONE, | 235 AddPPB(PPB_VAR_INTERFACE_1_1, API_ID_NONE, |
237 PPB_Var_Shared::GetVarInterface1_1(), PERMISSION_NONE); | 236 PPB_Var_Shared::GetVarInterface1_1(), PERMISSION_NONE); |
238 AddPPB(PPB_VAR_INTERFACE_1_0, API_ID_NONE, | 237 AddPPB(PPB_VAR_INTERFACE_1_0, API_ID_NONE, |
239 PPB_Var_Shared::GetVarInterface1_0(), PERMISSION_NONE); | 238 PPB_Var_Shared::GetVarInterface1_0(), PERMISSION_NONE); |
240 | 239 |
241 #if !defined(OS_NACL) | 240 #if !defined(OS_NACL) |
242 // PPB (browser) interfaces. | 241 // PPB (browser) interfaces. |
243 // Do not add more stuff here, they should be added to interface_list*.h | 242 // Do not add more stuff here, they should be added to interface_list*.h |
244 // TODO(brettw) remove these. | 243 // TODO(brettw) remove these. |
245 AddPPB(PPB_Instance_Proxy::GetInfoPrivate(), PERMISSION_PRIVATE); | 244 AddPPB(PPB_Instance_Proxy::GetInfoPrivate(), PERMISSION_PRIVATE); |
246 AddPPB(PPB_URLLoader_Proxy::GetTrustedInfo(), PERMISSION_PRIVATE); | |
247 AddPPB(PPB_Var_Deprecated_Proxy::GetInfo(), PERMISSION_DEV); | 245 AddPPB(PPB_Var_Deprecated_Proxy::GetInfo(), PERMISSION_DEV); |
248 | 246 |
249 // TODO(tomfinegan): Figure out where to put these once we refactor things | 247 // TODO(tomfinegan): Figure out where to put these once we refactor things |
250 // to load the PPP interface struct from the PPB interface. | 248 // to load the PPP interface struct from the PPB interface. |
251 AddProxy(API_ID_PPP_CONTENT_DECRYPTOR_PRIVATE, | 249 AddProxy(API_ID_PPP_CONTENT_DECRYPTOR_PRIVATE, |
252 &ProxyFactory<PPP_ContentDecryptor_Private_Proxy>); | 250 &ProxyFactory<PPP_ContentDecryptor_Private_Proxy>); |
253 AddPPP(PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE, | 251 AddPPP(PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE, |
254 API_ID_PPP_CONTENT_DECRYPTOR_PRIVATE, | 252 API_ID_PPP_CONTENT_DECRYPTOR_PRIVATE, |
255 PPP_ContentDecryptor_Private_Proxy::GetProxyInterface()); | 253 PPP_ContentDecryptor_Private_Proxy::GetProxyInterface()); |
256 #endif | 254 #endif |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 AddPPB(info->name, info->id, info->interface_ptr, perm); | 375 AddPPB(info->name, info->id, info->interface_ptr, perm); |
378 } | 376 } |
379 | 377 |
380 void InterfaceList::AddPPP(const InterfaceProxy::Info* info) { | 378 void InterfaceList::AddPPP(const InterfaceProxy::Info* info) { |
381 AddProxy(info->id, info->create_proxy); | 379 AddProxy(info->id, info->create_proxy); |
382 AddPPP(info->name, info->id, info->interface_ptr); | 380 AddPPP(info->name, info->id, info->interface_ptr); |
383 } | 381 } |
384 | 382 |
385 } // namespace proxy | 383 } // namespace proxy |
386 } // namespace ppapi | 384 } // namespace ppapi |
OLD | NEW |