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

Side by Side Diff: ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb.cc

Issue 9227008: WebSocket Pepper API: SRPC proxy implementation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase because two ppapi_proxy related CLs are landed Created 8 years, 11 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 // Implements the untrusted side of the PPB_GetInterface method. 5 // Implements the untrusted side of the PPB_GetInterface method.
6 6
7 #include "native_client/src/shared/ppapi_proxy/plugin_globals.h" 7 #include "native_client/src/shared/ppapi_proxy/plugin_globals.h"
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_audio.h" 10 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_audio.h"
(...skipping 20 matching lines...) Expand all
31 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_pdf.h" 31 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_pdf.h"
32 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_scrollbar.h" 32 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_scrollbar.h"
33 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_tcp_socket_private.h" 33 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_tcp_socket_private.h"
34 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_testing.h" 34 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_testing.h"
35 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_udp_socket_private.h" 35 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_udp_socket_private.h"
36 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_loader.h" 36 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_loader.h"
37 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_request_info.h" 37 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_request_info.h"
38 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_response_info.h" 38 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_response_info.h"
39 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_var.h" 39 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_var.h"
40 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_view.h" 40 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_view.h"
41 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_websocket.h"
41 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_widget.h" 42 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_widget.h"
42 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_zoom.h" 43 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_zoom.h"
43 #include "native_client/src/shared/ppapi_proxy/untrusted/srpcgen/ppb_rpc.h" 44 #include "native_client/src/shared/ppapi_proxy/untrusted/srpcgen/ppb_rpc.h"
44 #include "native_client/src/shared/ppapi_proxy/utility.h" 45 #include "native_client/src/shared/ppapi_proxy/utility.h"
45 46
46 namespace ppapi_proxy { 47 namespace ppapi_proxy {
47 48
48 namespace { 49 namespace {
49 50
50 struct InterfaceMapElement { 51 struct InterfaceMapElement {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 true }, 96 true },
96 { PPB_URLLOADER_INTERFACE, PluginURLLoader::GetInterface(), true }, 97 { PPB_URLLOADER_INTERFACE, PluginURLLoader::GetInterface(), true },
97 { PPB_URLREQUESTINFO_INTERFACE, PluginURLRequestInfo::GetInterface(), true }, 98 { PPB_URLREQUESTINFO_INTERFACE, PluginURLRequestInfo::GetInterface(), true },
98 { PPB_URLRESPONSEINFO_INTERFACE, PluginURLResponseInfo::GetInterface(), 99 { PPB_URLRESPONSEINFO_INTERFACE, PluginURLResponseInfo::GetInterface(),
99 true }, 100 true },
100 { PPB_VAR_ARRAY_BUFFER_DEV_INTERFACE, PluginVar::GetArrayBufferInterface(), 101 { PPB_VAR_ARRAY_BUFFER_DEV_INTERFACE, PluginVar::GetArrayBufferInterface(),
101 true }, 102 true },
102 { PPB_VAR_INTERFACE, PluginVar::GetInterface(), true }, 103 { PPB_VAR_INTERFACE, PluginVar::GetInterface(), true },
103 { PPB_VAR_INTERFACE_1_0, PluginVar::GetInterface1_0(), true }, 104 { PPB_VAR_INTERFACE_1_0, PluginVar::GetInterface1_0(), true },
104 { PPB_VIEW_INTERFACE, PluginView::GetInterface(), true }, 105 { PPB_VIEW_INTERFACE, PluginView::GetInterface(), true },
106 { PPB_WEBSOCKET_DEV_INTERFACE, PluginWebSocket::GetInterface(),
107 true },
105 { PPB_WHEEL_INPUT_EVENT_INTERFACE, PluginInputEvent::GetWheelInterface(), 108 { PPB_WHEEL_INPUT_EVENT_INTERFACE, PluginInputEvent::GetWheelInterface(),
106 true }, 109 true },
107 { PPB_WIDGET_DEV_INTERFACE, PluginWidget::GetInterface(), true }, 110 { PPB_WIDGET_DEV_INTERFACE, PluginWidget::GetInterface(), true },
108 { PPB_ZOOM_DEV_INTERFACE, PluginZoom::GetInterface(), true }, 111 { PPB_ZOOM_DEV_INTERFACE, PluginZoom::GetInterface(), true },
109 }; 112 };
110 113
111 } // namespace 114 } // namespace
112 115
113 // Returns the pointer to the interface proxy or NULL if not yet supported. 116 // Returns the pointer to the interface proxy or NULL if not yet supported.
114 // On the first invocation for a given interface that has proxy support, 117 // On the first invocation for a given interface that has proxy support,
(...skipping 28 matching lines...) Expand all
143 interface_name, NaClSrpcErrorString(srpc_result)); 146 interface_name, NaClSrpcErrorString(srpc_result));
144 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) { 147 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) {
145 interface_map[index].ppb_interface = NULL; 148 interface_map[index].ppb_interface = NULL;
146 ppb_interface = NULL; 149 ppb_interface = NULL;
147 } 150 }
148 interface_map[index].needs_browser_check = false; 151 interface_map[index].needs_browser_check = false;
149 return ppb_interface; 152 return ppb_interface;
150 } 153 }
151 154
152 } // namespace ppapi_proxy 155 } // namespace ppapi_proxy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698