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

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

Issue 10944005: Pepper WebSocket API: Implement new design Chrome IPC (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nits Created 8 years, 2 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
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.h ('k') | ppapi/proxy/websocket_resource.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/resource_creation_proxy.h" 5 #include "ppapi/proxy/resource_creation_proxy.h"
6 6
7 #include "ppapi/c/pp_errors.h" 7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/c/pp_size.h" 8 #include "ppapi/c/pp_size.h"
9 #include "ppapi/c/trusted/ppb_image_data_trusted.h" 9 #include "ppapi/c/trusted/ppb_image_data_trusted.h"
10 #include "ppapi/proxy/connection.h" 10 #include "ppapi/proxy/connection.h"
(...skipping 21 matching lines...) Expand all
32 #include "ppapi/proxy/ppb_talk_private_proxy.h" 32 #include "ppapi/proxy/ppb_talk_private_proxy.h"
33 #include "ppapi/proxy/ppb_tcp_server_socket_private_proxy.h" 33 #include "ppapi/proxy/ppb_tcp_server_socket_private_proxy.h"
34 #include "ppapi/proxy/ppb_tcp_socket_private_proxy.h" 34 #include "ppapi/proxy/ppb_tcp_socket_private_proxy.h"
35 #include "ppapi/proxy/ppb_udp_socket_private_proxy.h" 35 #include "ppapi/proxy/ppb_udp_socket_private_proxy.h"
36 #include "ppapi/proxy/ppb_url_loader_proxy.h" 36 #include "ppapi/proxy/ppb_url_loader_proxy.h"
37 #include "ppapi/proxy/ppb_video_capture_proxy.h" 37 #include "ppapi/proxy/ppb_video_capture_proxy.h"
38 #include "ppapi/proxy/ppb_video_decoder_proxy.h" 38 #include "ppapi/proxy/ppb_video_decoder_proxy.h"
39 #include "ppapi/proxy/ppb_x509_certificate_private_proxy.h" 39 #include "ppapi/proxy/ppb_x509_certificate_private_proxy.h"
40 #include "ppapi/proxy/printing_resource.h" 40 #include "ppapi/proxy/printing_resource.h"
41 #include "ppapi/proxy/url_request_info_resource.h" 41 #include "ppapi/proxy/url_request_info_resource.h"
42 #include "ppapi/proxy/websocket_resource.h"
42 #include "ppapi/shared_impl/api_id.h" 43 #include "ppapi/shared_impl/api_id.h"
43 #include "ppapi/shared_impl/host_resource.h" 44 #include "ppapi/shared_impl/host_resource.h"
44 #include "ppapi/shared_impl/ppb_audio_config_shared.h" 45 #include "ppapi/shared_impl/ppb_audio_config_shared.h"
45 #include "ppapi/shared_impl/ppb_input_event_shared.h" 46 #include "ppapi/shared_impl/ppb_input_event_shared.h"
46 #include "ppapi/shared_impl/ppb_resource_array_shared.h" 47 #include "ppapi/shared_impl/ppb_resource_array_shared.h"
47 #include "ppapi/shared_impl/private/ppb_browser_font_trusted_shared.h" 48 #include "ppapi/shared_impl/private/ppb_browser_font_trusted_shared.h"
48 #include "ppapi/shared_impl/var.h" 49 #include "ppapi/shared_impl/var.h"
49 #include "ppapi/thunk/enter.h" 50 #include "ppapi/thunk/enter.h"
50 #include "ppapi/thunk/ppb_image_data_api.h" 51 #include "ppapi/thunk/ppb_image_data_api.h"
51 52
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 PP_Resource ResourceCreationProxy::CreateTCPSocketPrivate( 250 PP_Resource ResourceCreationProxy::CreateTCPSocketPrivate(
250 PP_Instance instance) { 251 PP_Instance instance) {
251 return PPB_TCPSocket_Private_Proxy::CreateProxyResource(instance); 252 return PPB_TCPSocket_Private_Proxy::CreateProxyResource(instance);
252 } 253 }
253 254
254 PP_Resource ResourceCreationProxy::CreateUDPSocketPrivate( 255 PP_Resource ResourceCreationProxy::CreateUDPSocketPrivate(
255 PP_Instance instance) { 256 PP_Instance instance) {
256 return PPB_UDPSocket_Private_Proxy::CreateProxyResource(instance); 257 return PPB_UDPSocket_Private_Proxy::CreateProxyResource(instance);
257 } 258 }
258 259
260 PP_Resource ResourceCreationProxy::CreateWebSocket(PP_Instance instance) {
261 return (new WebSocketResource(GetConnection(), instance))->GetReference();
262 }
263
259 PP_Resource ResourceCreationProxy::CreateX509CertificatePrivate( 264 PP_Resource ResourceCreationProxy::CreateX509CertificatePrivate(
260 PP_Instance instance) { 265 PP_Instance instance) {
261 return PPB_X509Certificate_Private_Proxy::CreateProxyResource(instance); 266 return PPB_X509Certificate_Private_Proxy::CreateProxyResource(instance);
262 } 267 }
263 268
264 #if !defined(OS_NACL) 269 #if !defined(OS_NACL)
265 PP_Resource ResourceCreationProxy::CreateAudioInput0_1( 270 PP_Resource ResourceCreationProxy::CreateAudioInput0_1(
266 PP_Instance instance, 271 PP_Instance instance,
267 PP_Resource config_id, 272 PP_Resource config_id,
268 PPB_AudioInput_Callback audio_input_callback, 273 PPB_AudioInput_Callback audio_input_callback,
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 } 349 }
345 350
346 PP_Resource ResourceCreationProxy::CreateVideoDecoder( 351 PP_Resource ResourceCreationProxy::CreateVideoDecoder(
347 PP_Instance instance, 352 PP_Instance instance,
348 PP_Resource context3d_id, 353 PP_Resource context3d_id,
349 PP_VideoDecoder_Profile profile) { 354 PP_VideoDecoder_Profile profile) {
350 return PPB_VideoDecoder_Proxy::CreateProxyResource( 355 return PPB_VideoDecoder_Proxy::CreateProxyResource(
351 instance, context3d_id, profile); 356 instance, context3d_id, profile);
352 } 357 }
353 358
354 PP_Resource ResourceCreationProxy::CreateWebSocket(PP_Instance instance) {
355 NOTIMPLEMENTED();
356 return 0;
357 }
358
359 #endif // !defined(OS_NACL) 359 #endif // !defined(OS_NACL)
360 360
361 bool ResourceCreationProxy::Send(IPC::Message* msg) { 361 bool ResourceCreationProxy::Send(IPC::Message* msg) {
362 return dispatcher()->Send(msg); 362 return dispatcher()->Send(msg);
363 } 363 }
364 364
365 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { 365 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) {
366 return false; 366 return false;
367 } 367 }
368 368
369 Connection ResourceCreationProxy::GetConnection() { 369 Connection ResourceCreationProxy::GetConnection() {
370 return Connection( 370 return Connection(
371 PluginGlobals::Get()->plugin_proxy_delegate()->GetBrowserSender(), 371 PluginGlobals::Get()->plugin_proxy_delegate()->GetBrowserSender(),
372 dispatcher()); 372 dispatcher());
373 } 373 }
374 374
375 } // namespace proxy 375 } // namespace proxy
376 } // namespace ppapi 376 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.h ('k') | ppapi/proxy/websocket_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698