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

Side by Side Diff: content/renderer/pepper_plugin_delegate_impl.h

Issue 9283022: Exposed Listen and Accept methods to plugin. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added comment, fixed StopListening. Created 8 years, 10 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
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 #ifndef CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_
6 #define CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ 6 #define CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket, 326 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket,
327 uint32 socket_id, 327 uint32 socket_id,
328 const PP_NetAddress_Private& addr) OVERRIDE; 328 const PP_NetAddress_Private& addr) OVERRIDE;
329 virtual void TCPSocketSSLHandshake(uint32 socket_id, 329 virtual void TCPSocketSSLHandshake(uint32 socket_id,
330 const std::string& server_name, 330 const std::string& server_name,
331 uint16_t server_port) OVERRIDE; 331 uint16_t server_port) OVERRIDE;
332 virtual void TCPSocketRead(uint32 socket_id, int32_t bytes_to_read) OVERRIDE; 332 virtual void TCPSocketRead(uint32 socket_id, int32_t bytes_to_read) OVERRIDE;
333 virtual void TCPSocketWrite(uint32 socket_id, 333 virtual void TCPSocketWrite(uint32 socket_id,
334 const std::string& buffer) OVERRIDE; 334 const std::string& buffer) OVERRIDE;
335 virtual void TCPSocketDisconnect(uint32 socket_id) OVERRIDE; 335 virtual void TCPSocketDisconnect(uint32 socket_id) OVERRIDE;
336 virtual void RegisterTCPSocket(
337 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket,
338 uint32 socket_id) OVERRIDE;
336 339
337 virtual uint32 UDPSocketCreate() OVERRIDE; 340 virtual uint32 UDPSocketCreate() OVERRIDE;
338 virtual void UDPSocketBind( 341 virtual void UDPSocketBind(
339 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket, 342 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket,
340 uint32 socket_id, 343 uint32 socket_id,
341 const PP_NetAddress_Private& addr) OVERRIDE; 344 const PP_NetAddress_Private& addr) OVERRIDE;
342 virtual void UDPSocketRecvFrom(uint32 socket_id, 345 virtual void UDPSocketRecvFrom(uint32 socket_id,
343 int32_t num_bytes) OVERRIDE; 346 int32_t num_bytes) OVERRIDE;
344 virtual void UDPSocketSendTo(uint32 socket_id, 347 virtual void UDPSocketSendTo(uint32 socket_id,
345 const std::string& buffer, 348 const std::string& buffer,
346 const PP_NetAddress_Private& addr) OVERRIDE; 349 const PP_NetAddress_Private& addr) OVERRIDE;
347 virtual void UDPSocketClose(uint32 socket_id) OVERRIDE; 350 virtual void UDPSocketClose(uint32 socket_id) OVERRIDE;
351 virtual void TCPServerSocketListen(
352 webkit::ppapi::PPB_TCPServerSocket_Private_Impl* socket,
353 uint32 temp_socket_id,
354 const PP_NetAddress_Private& addr,
355 int32_t backlog) OVERRIDE;
356 virtual void TCPServerSocketAccept(uint32 real_socket_id) OVERRIDE;
357 virtual void TCPServerSocketStopListening(uint32 real_socket_id,
358 uint32 temp_socket_id) OVERRIDE;
348 359
349 virtual int32_t ShowContextMenu( 360 virtual int32_t ShowContextMenu(
350 webkit::ppapi::PluginInstance* instance, 361 webkit::ppapi::PluginInstance* instance,
351 webkit::ppapi::PPB_Flash_Menu_Impl* menu, 362 webkit::ppapi::PPB_Flash_Menu_Impl* menu,
352 const gfx::Point& position) OVERRIDE; 363 const gfx::Point& position) OVERRIDE;
353 void OnContextMenuClosed( 364 void OnContextMenuClosed(
354 const content::CustomContextMenuContext& custom_context); 365 const content::CustomContextMenuContext& custom_context);
355 void OnCustomContextMenuAction( 366 void OnCustomContextMenuAction(
356 const content::CustomContextMenuContext& custom_context, 367 const content::CustomContextMenuContext& custom_context,
357 unsigned action); 368 unsigned action);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 bool succeeded); 423 bool succeeded);
413 void OnUDPSocketSendToACK(uint32 plugin_dispatcher_id, 424 void OnUDPSocketSendToACK(uint32 plugin_dispatcher_id,
414 uint32 socket_id, 425 uint32 socket_id,
415 bool succeeded, 426 bool succeeded,
416 int32_t bytes_written); 427 int32_t bytes_written);
417 void OnUDPSocketRecvFromACK(uint32 plugin_dispatcher_id, 428 void OnUDPSocketRecvFromACK(uint32 plugin_dispatcher_id,
418 uint32 socket_id, 429 uint32 socket_id,
419 bool succeeded, 430 bool succeeded,
420 const std::string& data, 431 const std::string& data,
421 const PP_NetAddress_Private& addr); 432 const PP_NetAddress_Private& addr);
433 void OnTCPServerSocketListenACK(uint32 plugin_dispatcher_id,
434 uint32 real_socket_id,
435 uint32 temp_socket_id,
436 int32_t status);
437 void OnTCPServerSocketAcceptACK(uint32 plugin_dispatcher_id,
438 uint32 real_server_socket_id,
439 uint32 accepted_socket_id,
440 const PP_NetAddress_Private& local_addr,
441 const PP_NetAddress_Private& remote_addr);
422 442
423 CONTENT_EXPORT int GetRoutingId() const; 443 CONTENT_EXPORT int GetRoutingId() const;
424 444
425 private: 445 private:
426 // Asynchronously attempts to create a PPAPI broker for the given plugin. 446 // Asynchronously attempts to create a PPAPI broker for the given plugin.
427 scoped_refptr<PpapiBrokerImpl> CreatePpapiBroker( 447 scoped_refptr<PpapiBrokerImpl> CreatePpapiBroker(
428 webkit::ppapi::PluginModule* plugin_module); 448 webkit::ppapi::PluginModule* plugin_module);
429 449
430 // Implementation of PepperParentContextProvider. 450 // Implementation of PepperParentContextProvider.
431 virtual ContentGLContext* GetParentContextForPlatformContext3D() OVERRIDE; 451 virtual ContentGLContext* GetParentContextForPlatformContext3D() OVERRIDE;
(...skipping 26 matching lines...) Expand all
458 478
459 IDMap<AsyncOpenFileCallback> pending_async_open_files_; 479 IDMap<AsyncOpenFileCallback> pending_async_open_files_;
460 480
461 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_NetConnector_Impl>, 481 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_NetConnector_Impl>,
462 IDMapOwnPointer> pending_connect_tcps_; 482 IDMapOwnPointer> pending_connect_tcps_;
463 483
464 IDMap<webkit::ppapi::PPB_TCPSocket_Private_Impl> tcp_sockets_; 484 IDMap<webkit::ppapi::PPB_TCPSocket_Private_Impl> tcp_sockets_;
465 485
466 IDMap<webkit::ppapi::PPB_UDPSocket_Private_Impl> udp_sockets_; 486 IDMap<webkit::ppapi::PPB_UDPSocket_Private_Impl> udp_sockets_;
467 487
488 IDMap<webkit::ppapi::PPB_TCPServerSocket_Private_Impl> tcp_server_sockets_;
489
490 IDMap<webkit::ppapi::PPB_TCPServerSocket_Private_Impl>
491 uninitialized_tcp_server_sockets_;
492
468 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_Menu_Impl>, 493 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_Menu_Impl>,
469 IDMapOwnPointer> pending_context_menus_; 494 IDMapOwnPointer> pending_context_menus_;
470 495
471 typedef IDMap<scoped_refptr<PpapiBrokerImpl>, IDMapOwnPointer> BrokerMap; 496 typedef IDMap<scoped_refptr<PpapiBrokerImpl>, IDMapOwnPointer> BrokerMap;
472 BrokerMap pending_connect_broker_; 497 BrokerMap pending_connect_broker_;
473 498
474 // Whether or not the focus is on a PPAPI plugin 499 // Whether or not the focus is on a PPAPI plugin
475 webkit::ppapi::PluginInstance* focused_plugin_; 500 webkit::ppapi::PluginInstance* focused_plugin_;
476 501
477 // Current text input composition text. Empty if no composition is in 502 // Current text input composition text. Empty if no composition is in
478 // progress. 503 // progress.
479 string16 composition_text_; 504 string16 composition_text_;
480 505
481 // The plugin instance that received the last mouse event. It is set to NULL 506 // The plugin instance that received the last mouse event. It is set to NULL
482 // if the last mouse event went to elements other than Pepper plugins. 507 // if the last mouse event went to elements other than Pepper plugins.
483 // |last_mouse_event_target_| is not owned by this class. We can know about 508 // |last_mouse_event_target_| is not owned by this class. We can know about
484 // when it is destroyed via InstanceDeleted(). 509 // when it is destroyed via InstanceDeleted().
485 webkit::ppapi::PluginInstance* last_mouse_event_target_; 510 webkit::ppapi::PluginInstance* last_mouse_event_target_;
486 511
487 scoped_ptr<content::GamepadSharedMemoryReader> gamepad_shared_memory_reader_; 512 scoped_ptr<content::GamepadSharedMemoryReader> gamepad_shared_memory_reader_;
488 513
489 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); 514 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl);
490 }; 515 };
491 516
492 #endif // CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ 517 #endif // CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698