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

Side by Side Diff: ppapi/proxy/ppb_flash_udp_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_udp_socket_proxy.h" 5 #include "ppapi/proxy/ppb_flash_udp_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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 } // namespace 290 } // namespace
291 291
292 PPB_Flash_UDPSocket_Proxy::PPB_Flash_UDPSocket_Proxy(Dispatcher* dispatcher) 292 PPB_Flash_UDPSocket_Proxy::PPB_Flash_UDPSocket_Proxy(Dispatcher* dispatcher)
293 : InterfaceProxy(dispatcher) { 293 : InterfaceProxy(dispatcher) {
294 } 294 }
295 295
296 PPB_Flash_UDPSocket_Proxy::~PPB_Flash_UDPSocket_Proxy() { 296 PPB_Flash_UDPSocket_Proxy::~PPB_Flash_UDPSocket_Proxy() {
297 } 297 }
298 298
299 // static 299 // static
300 const InterfaceProxy::Info* PPB_Flash_UDPSocket_Proxy::GetInfo() {
301 static const Info info = {
302 ::ppapi::thunk::GetPPB_Flash_UDPSocket_Thunk(),
303 PPB_FLASH_UDPSOCKET_INTERFACE,
304 API_ID_PPB_FLASH_UDPSOCKET,
305 false,
306 &CreateFlashUDPSocketProxy,
307 };
308 return &info;
309 }
310
311 // static
312 PP_Resource PPB_Flash_UDPSocket_Proxy::CreateProxyResource( 300 PP_Resource PPB_Flash_UDPSocket_Proxy::CreateProxyResource(
313 PP_Instance instance) { 301 PP_Instance instance) {
314 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance); 302 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
315 if (!dispatcher) 303 if (!dispatcher)
316 return 0; 304 return 0;
317 305
318 uint32 socket_id = 0; 306 uint32 socket_id = 0;
319 dispatcher->SendToBrowser(new PpapiHostMsg_PPBFlashUDPSocket_Create( 307 dispatcher->SendToBrowser(new PpapiHostMsg_PPBFlashUDPSocket_Create(
320 API_ID_PPB_FLASH_UDPSOCKET, dispatcher->plugin_dispatcher_id(), 308 API_ID_PPB_FLASH_UDPSOCKET, dispatcher->plugin_dispatcher_id(),
321 &socket_id)); 309 &socket_id));
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 } 369 }
382 IDToSocketMap::iterator iter = g_id_to_socket->find(socket_id); 370 IDToSocketMap::iterator iter = g_id_to_socket->find(socket_id);
383 if (iter == g_id_to_socket->end()) 371 if (iter == g_id_to_socket->end())
384 return; 372 return;
385 iter->second->OnSendToCompleted(succeeded, bytes_written); 373 iter->second->OnSendToCompleted(succeeded, bytes_written);
386 } 374 }
387 375
388 } // namespace proxy 376 } // namespace proxy
389 } // namespace ppapi 377 } // namespace ppapi
390 378
OLDNEW
« ppapi/proxy/ppb_flash_menu_proxy.cc ('K') | « ppapi/proxy/ppb_flash_udp_socket_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698