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

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: fix win32 build 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 19 matching lines...) Expand all
30 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_pdf.h" 30 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_pdf.h"
31 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_scrollbar.h" 31 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_scrollbar.h"
32 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_tcp_socket_private.h" 32 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_tcp_socket_private.h"
33 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_testing.h" 33 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_testing.h"
34 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_udp_socket_private.h" 34 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_udp_socket_private.h"
35 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_loader.h" 35 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_loader.h"
36 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_request_info.h" 36 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_request_info.h"
37 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_response_info.h" 37 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_response_info.h"
38 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_var.h" 38 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_var.h"
39 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_view.h" 39 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_view.h"
40 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_websocket.h"
40 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_widget.h" 41 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_widget.h"
41 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_zoom.h" 42 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_zoom.h"
42 #include "native_client/src/shared/ppapi_proxy/untrusted/srpcgen/ppb_rpc.h" 43 #include "native_client/src/shared/ppapi_proxy/untrusted/srpcgen/ppb_rpc.h"
43 #include "native_client/src/shared/ppapi_proxy/utility.h" 44 #include "native_client/src/shared/ppapi_proxy/utility.h"
44 45
45 namespace ppapi_proxy { 46 namespace ppapi_proxy {
46 47
47 namespace { 48 namespace {
48 49
49 struct InterfaceMapElement { 50 struct InterfaceMapElement {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 true }, 93 true },
93 { PPB_URLLOADER_INTERFACE, PluginURLLoader::GetInterface(), true }, 94 { PPB_URLLOADER_INTERFACE, PluginURLLoader::GetInterface(), true },
94 { PPB_URLREQUESTINFO_INTERFACE, PluginURLRequestInfo::GetInterface(), true }, 95 { PPB_URLREQUESTINFO_INTERFACE, PluginURLRequestInfo::GetInterface(), true },
95 { PPB_URLRESPONSEINFO_INTERFACE, PluginURLResponseInfo::GetInterface(), 96 { PPB_URLRESPONSEINFO_INTERFACE, PluginURLResponseInfo::GetInterface(),
96 true }, 97 true },
97 { PPB_VAR_ARRAY_BUFFER_DEV_INTERFACE, PluginVar::GetArrayBufferInterface(), 98 { PPB_VAR_ARRAY_BUFFER_DEV_INTERFACE, PluginVar::GetArrayBufferInterface(),
98 true }, 99 true },
99 { PPB_VAR_INTERFACE, PluginVar::GetInterface(), true }, 100 { PPB_VAR_INTERFACE, PluginVar::GetInterface(), true },
100 { PPB_VAR_INTERFACE_1_0, PluginVar::GetInterface1_0(), true }, 101 { PPB_VAR_INTERFACE_1_0, PluginVar::GetInterface1_0(), true },
101 { PPB_VIEW_INTERFACE, PluginView::GetInterface(), true }, 102 { PPB_VIEW_INTERFACE, PluginView::GetInterface(), true },
103 { PPB_WEBSOCKET_DEV_INTERFACE, PluginWebSocket::GetInterface(),
104 true },
102 { PPB_WHEEL_INPUT_EVENT_INTERFACE, PluginInputEvent::GetWheelInterface(), 105 { PPB_WHEEL_INPUT_EVENT_INTERFACE, PluginInputEvent::GetWheelInterface(),
103 true }, 106 true },
104 { PPB_WIDGET_DEV_INTERFACE, PluginWidget::GetInterface(), true }, 107 { PPB_WIDGET_DEV_INTERFACE, PluginWidget::GetInterface(), true },
105 { PPB_ZOOM_DEV_INTERFACE, PluginZoom::GetInterface(), true }, 108 { PPB_ZOOM_DEV_INTERFACE, PluginZoom::GetInterface(), true },
106 }; 109 };
107 110
108 } // namespace 111 } // namespace
109 112
110 // Returns the pointer to the interface proxy or NULL if not yet supported. 113 // Returns the pointer to the interface proxy or NULL if not yet supported.
111 // On the first invocation for a given interface that has proxy support, 114 // On the first invocation for a given interface that has proxy support,
(...skipping 28 matching lines...) Expand all
140 interface_name, NaClSrpcErrorString(srpc_result)); 143 interface_name, NaClSrpcErrorString(srpc_result));
141 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) { 144 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) {
142 interface_map[index].ppb_interface = NULL; 145 interface_map[index].ppb_interface = NULL;
143 ppb_interface = NULL; 146 ppb_interface = NULL;
144 } 147 }
145 interface_map[index].needs_browser_check = false; 148 interface_map[index].needs_browser_check = false;
146 return ppb_interface; 149 return ppb_interface;
147 } 150 }
148 151
149 } // namespace ppapi_proxy 152 } // namespace ppapi_proxy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698