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

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

Issue 8359010: Convert the Flash interfaces to no longer use GetInfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ppb_flash_tcp_socket_proxy.h" 5 #include "ppapi/proxy/ppb_flash_tcp_socket_proxy.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstring> 8 #include <cstring>
9 #include <map> 9 #include <map>
10 10
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 } 395 }
396 396
397 PPB_Flash_TCPSocket_Proxy::PPB_Flash_TCPSocket_Proxy(Dispatcher* dispatcher) 397 PPB_Flash_TCPSocket_Proxy::PPB_Flash_TCPSocket_Proxy(Dispatcher* dispatcher)
398 : InterfaceProxy(dispatcher) { 398 : InterfaceProxy(dispatcher) {
399 } 399 }
400 400
401 PPB_Flash_TCPSocket_Proxy::~PPB_Flash_TCPSocket_Proxy() { 401 PPB_Flash_TCPSocket_Proxy::~PPB_Flash_TCPSocket_Proxy() {
402 } 402 }
403 403
404 // static 404 // static
405 const InterfaceProxy::Info* PPB_Flash_TCPSocket_Proxy::GetInfo() {
406 static const Info info = {
407 thunk::GetPPB_Flash_TCPSocket_Thunk(),
408 PPB_FLASH_TCPSOCKET_INTERFACE,
409 API_ID_PPB_FLASH_TCPSOCKET,
410 false,
411 &CreateFlashTCPSocketProxy,
412 };
413 return &info;
414 }
415
416 // static
417 PP_Resource PPB_Flash_TCPSocket_Proxy::CreateProxyResource( 405 PP_Resource PPB_Flash_TCPSocket_Proxy::CreateProxyResource(
418 PP_Instance instance) { 406 PP_Instance instance) {
419 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance); 407 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
420 if (!dispatcher) 408 if (!dispatcher)
421 return 0; 409 return 0;
422 410
423 uint32 socket_id = 0; 411 uint32 socket_id = 0;
424 dispatcher->SendToBrowser(new PpapiHostMsg_PPBFlashTCPSocket_Create( 412 dispatcher->SendToBrowser(new PpapiHostMsg_PPBFlashTCPSocket_Create(
425 API_ID_PPB_FLASH_TCPSOCKET, dispatcher->plugin_dispatcher_id(), 413 API_ID_PPB_FLASH_TCPSOCKET, dispatcher->plugin_dispatcher_id(),
426 &socket_id)); 414 &socket_id));
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 return; 484 return;
497 } 485 }
498 IDToSocketMap::iterator iter = g_id_to_socket->find(socket_id); 486 IDToSocketMap::iterator iter = g_id_to_socket->find(socket_id);
499 if (iter == g_id_to_socket->end()) 487 if (iter == g_id_to_socket->end())
500 return; 488 return;
501 iter->second->OnWriteCompleted(succeeded, bytes_written); 489 iter->second->OnWriteCompleted(succeeded, bytes_written);
502 } 490 }
503 491
504 } // namespace proxy 492 } // namespace proxy
505 } // namespace ppapi 493 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698