Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: ppapi/proxy/interface_list.cc

Issue 9455083: Proxy the PPP_Printing interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 #include "ppapi/proxy/ppb_var_deprecated_proxy.h" 97 #include "ppapi/proxy/ppb_var_deprecated_proxy.h"
98 #include "ppapi/proxy/ppb_video_capture_proxy.h" 98 #include "ppapi/proxy/ppb_video_capture_proxy.h"
99 #include "ppapi/proxy/ppb_video_decoder_proxy.h" 99 #include "ppapi/proxy/ppb_video_decoder_proxy.h"
100 #include "ppapi/proxy/ppp_class_proxy.h" 100 #include "ppapi/proxy/ppp_class_proxy.h"
101 #include "ppapi/proxy/ppp_graphics_3d_proxy.h" 101 #include "ppapi/proxy/ppp_graphics_3d_proxy.h"
102 #include "ppapi/proxy/ppp_input_event_proxy.h" 102 #include "ppapi/proxy/ppp_input_event_proxy.h"
103 #include "ppapi/proxy/ppp_instance_private_proxy.h" 103 #include "ppapi/proxy/ppp_instance_private_proxy.h"
104 #include "ppapi/proxy/ppp_instance_proxy.h" 104 #include "ppapi/proxy/ppp_instance_proxy.h"
105 #include "ppapi/proxy/ppp_messaging_proxy.h" 105 #include "ppapi/proxy/ppp_messaging_proxy.h"
106 #include "ppapi/proxy/ppp_mouse_lock_proxy.h" 106 #include "ppapi/proxy/ppp_mouse_lock_proxy.h"
107 #include "ppapi/proxy/ppp_printing_proxy.h"
107 #include "ppapi/proxy/ppp_video_decoder_proxy.h" 108 #include "ppapi/proxy/ppp_video_decoder_proxy.h"
108 #include "ppapi/proxy/resource_creation_proxy.h" 109 #include "ppapi/proxy/resource_creation_proxy.h"
109 #include "ppapi/shared_impl/ppb_opengles2_shared.h" 110 #include "ppapi/shared_impl/ppb_opengles2_shared.h"
110 #include "ppapi/shared_impl/ppb_var_shared.h" 111 #include "ppapi/shared_impl/ppb_var_shared.h"
111 #include "ppapi/thunk/thunk.h" 112 #include "ppapi/thunk/thunk.h"
112 113
113 // Helper to get the proxy name PPB_Foo_Proxy given the API name PPB_Foo. 114 // Helper to get the proxy name PPB_Foo_Proxy given the API name PPB_Foo.
114 #define PROXY_CLASS_NAME(api_name) api_name##_Proxy 115 #define PROXY_CLASS_NAME(api_name) api_name##_Proxy
115 116
116 // Helper to get the interface ID PPB_Foo_Proxy::kApiID given the API 117 // Helper to get the interface ID PPB_Foo_Proxy::kApiID given the API
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 AddPPB(PPB_PDF_Proxy::GetInfo()); 198 AddPPB(PPB_PDF_Proxy::GetInfo());
198 AddPPB(PPB_Testing_Proxy::GetInfo()); 199 AddPPB(PPB_Testing_Proxy::GetInfo());
199 AddPPB(PPB_URLLoader_Proxy::GetTrustedInfo()); 200 AddPPB(PPB_URLLoader_Proxy::GetTrustedInfo());
200 AddPPB(PPB_Var_Deprecated_Proxy::GetInfo()); 201 AddPPB(PPB_Var_Deprecated_Proxy::GetInfo());
201 202
202 // PPP (plugin) interfaces. 203 // PPP (plugin) interfaces.
203 // TODO(brettw) move these to interface_list*.h 204 // TODO(brettw) move these to interface_list*.h
204 AddProxy(API_ID_PPP_INSTANCE, &ProxyFactory<PPP_Instance_Proxy>); 205 AddProxy(API_ID_PPP_INSTANCE, &ProxyFactory<PPP_Instance_Proxy>);
205 AddPPP(PPP_INSTANCE_INTERFACE_1_1, API_ID_PPP_INSTANCE, 206 AddPPP(PPP_INSTANCE_INTERFACE_1_1, API_ID_PPP_INSTANCE,
206 PPP_Instance_Proxy::GetInstanceInterface()); 207 PPP_Instance_Proxy::GetInstanceInterface());
208 AddProxy(API_ID_PPP_PRINTING, &ProxyFactory<PPP_Printing_Proxy>);
209 AddPPP(PPP_PRINTING_DEV_INTERFACE, API_ID_PPP_PRINTING,
210 PPP_Printing_Proxy::GetProxyInterface());
207 211
208 // Old-style GetInfo PPP interfaces. 212 // Old-style GetInfo PPP interfaces.
209 // Do not add more stuff here, they should be added to interface_list*.h 213 // Do not add more stuff here, they should be added to interface_list*.h
210 // TODO(brettw) remove these. 214 // TODO(brettw) remove these.
211 AddPPP(PPP_Graphics3D_Proxy::GetInfo()); 215 AddPPP(PPP_Graphics3D_Proxy::GetInfo());
212 AddPPP(PPP_InputEvent_Proxy::GetInfo()); 216 AddPPP(PPP_InputEvent_Proxy::GetInfo());
213 AddPPP(PPP_Instance_Private_Proxy::GetInfo()); 217 AddPPP(PPP_Instance_Private_Proxy::GetInfo());
214 AddPPP(PPP_Messaging_Proxy::GetInfo()); 218 AddPPP(PPP_Messaging_Proxy::GetInfo());
215 AddPPP(PPP_MouseLock_Proxy::GetInfo()); 219 AddPPP(PPP_MouseLock_Proxy::GetInfo());
216 AddPPP(PPP_VideoCapture_Proxy::GetInfo()); 220 AddPPP(PPP_VideoCapture_Proxy::GetInfo());
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 AddPPB(info->name, info->id, info->interface_ptr); 354 AddPPB(info->name, info->id, info->interface_ptr);
351 } 355 }
352 356
353 void InterfaceList::AddPPP(const InterfaceProxy::Info* info) { 357 void InterfaceList::AddPPP(const InterfaceProxy::Info* info) {
354 AddProxy(info->id, info->create_proxy); 358 AddProxy(info->id, info->create_proxy);
355 AddPPP(info->name, info->id, info->interface_ptr); 359 AddPPP(info->name, info->id, info->interface_ptr);
356 } 360 }
357 361
358 } // namespace proxy 362 } // namespace proxy
359 } // namespace ppapi 363 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698