| OLD | NEW |
| 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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket, | 333 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket, |
| 334 uint32 socket_id, | 334 uint32 socket_id, |
| 335 const PP_NetAddress_Private& addr) OVERRIDE; | 335 const PP_NetAddress_Private& addr) OVERRIDE; |
| 336 virtual void TCPSocketSSLHandshake(uint32 socket_id, | 336 virtual void TCPSocketSSLHandshake(uint32 socket_id, |
| 337 const std::string& server_name, | 337 const std::string& server_name, |
| 338 uint16_t server_port) OVERRIDE; | 338 uint16_t server_port) OVERRIDE; |
| 339 virtual void TCPSocketRead(uint32 socket_id, int32_t bytes_to_read) OVERRIDE; | 339 virtual void TCPSocketRead(uint32 socket_id, int32_t bytes_to_read) OVERRIDE; |
| 340 virtual void TCPSocketWrite(uint32 socket_id, | 340 virtual void TCPSocketWrite(uint32 socket_id, |
| 341 const std::string& buffer) OVERRIDE; | 341 const std::string& buffer) OVERRIDE; |
| 342 virtual void TCPSocketDisconnect(uint32 socket_id) OVERRIDE; | 342 virtual void TCPSocketDisconnect(uint32 socket_id) OVERRIDE; |
| 343 virtual void TCPSocketRegister( |
| 344 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket, |
| 345 uint32 socket_id) OVERRIDE; |
| 343 | 346 |
| 344 virtual uint32 UDPSocketCreate() OVERRIDE; | 347 virtual uint32 UDPSocketCreate() OVERRIDE; |
| 345 virtual void UDPSocketBind( | 348 virtual void UDPSocketBind( |
| 346 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket, | 349 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket, |
| 347 uint32 socket_id, | 350 uint32 socket_id, |
| 348 const PP_NetAddress_Private& addr) OVERRIDE; | 351 const PP_NetAddress_Private& addr) OVERRIDE; |
| 349 virtual void UDPSocketRecvFrom(uint32 socket_id, | 352 virtual void UDPSocketRecvFrom(uint32 socket_id, |
| 350 int32_t num_bytes) OVERRIDE; | 353 int32_t num_bytes) OVERRIDE; |
| 351 virtual void UDPSocketSendTo(uint32 socket_id, | 354 virtual void UDPSocketSendTo(uint32 socket_id, |
| 352 const std::string& buffer, | 355 const std::string& buffer, |
| 353 const PP_NetAddress_Private& addr) OVERRIDE; | 356 const PP_NetAddress_Private& addr) OVERRIDE; |
| 354 virtual void UDPSocketClose(uint32 socket_id) OVERRIDE; | 357 virtual void UDPSocketClose(uint32 socket_id) OVERRIDE; |
| 355 | 358 |
| 359 virtual uint32 TCPServerSocketCreate() OVERRIDE; |
| 360 virtual void TCPServerSocketListen( |
| 361 webkit::ppapi::PPB_TCPServerSocket_Private_Impl* socket, |
| 362 uint32 socket_id, |
| 363 const PP_NetAddress_Private& addr, |
| 364 int32_t backlog) OVERRIDE; |
| 365 virtual void TCPServerSocketAccept(uint32 socket_id) OVERRIDE; |
| 366 virtual void TCPServerSocketStopListening(uint32 socket_id) OVERRIDE; |
| 367 |
| 356 virtual int32_t ShowContextMenu( | 368 virtual int32_t ShowContextMenu( |
| 357 webkit::ppapi::PluginInstance* instance, | 369 webkit::ppapi::PluginInstance* instance, |
| 358 webkit::ppapi::PPB_Flash_Menu_Impl* menu, | 370 webkit::ppapi::PPB_Flash_Menu_Impl* menu, |
| 359 const gfx::Point& position) OVERRIDE; | 371 const gfx::Point& position) OVERRIDE; |
| 360 void OnContextMenuClosed( | 372 void OnContextMenuClosed( |
| 361 const webkit_glue::CustomContextMenuContext& custom_context); | 373 const webkit_glue::CustomContextMenuContext& custom_context); |
| 362 void OnCustomContextMenuAction( | 374 void OnCustomContextMenuAction( |
| 363 const webkit_glue::CustomContextMenuContext& custom_context, | 375 const webkit_glue::CustomContextMenuContext& custom_context, |
| 364 unsigned action); | 376 unsigned action); |
| 365 void CompleteShowContextMenu(int request_id, | 377 void CompleteShowContextMenu(int request_id, |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 void OnUDPSocketSendToACK(uint32 plugin_dispatcher_id, | 431 void OnUDPSocketSendToACK(uint32 plugin_dispatcher_id, |
| 420 uint32 socket_id, | 432 uint32 socket_id, |
| 421 bool succeeded, | 433 bool succeeded, |
| 422 int32_t bytes_written); | 434 int32_t bytes_written); |
| 423 void OnUDPSocketRecvFromACK(uint32 plugin_dispatcher_id, | 435 void OnUDPSocketRecvFromACK(uint32 plugin_dispatcher_id, |
| 424 uint32 socket_id, | 436 uint32 socket_id, |
| 425 bool succeeded, | 437 bool succeeded, |
| 426 const std::string& data, | 438 const std::string& data, |
| 427 const PP_NetAddress_Private& addr); | 439 const PP_NetAddress_Private& addr); |
| 428 | 440 |
| 441 void OnTCPServerSocketListenACK(uint32 plugin_dispatcher_id, |
| 442 uint32 socket_id, |
| 443 bool succeeded); |
| 444 void OnTCPServerSocketAcceptACK(uint32 plugin_dispatcher_id, |
| 445 uint32 tcp_server_socket_id, |
| 446 uint32 tcp_socket_id, |
| 447 const PP_NetAddress_Private& local_addr, |
| 448 const PP_NetAddress_Private& remote_addr); |
| 449 |
| 429 CONTENT_EXPORT int GetRoutingId() const; | 450 CONTENT_EXPORT int GetRoutingId() const; |
| 430 | 451 |
| 431 private: | 452 private: |
| 432 // Asynchronously attempts to create a PPAPI broker for the given plugin. | 453 // Asynchronously attempts to create a PPAPI broker for the given plugin. |
| 433 scoped_refptr<PpapiBrokerImpl> CreatePpapiBroker( | 454 scoped_refptr<PpapiBrokerImpl> CreatePpapiBroker( |
| 434 webkit::ppapi::PluginModule* plugin_module); | 455 webkit::ppapi::PluginModule* plugin_module); |
| 435 | 456 |
| 436 bool MouseLockedOrPending() const { | 457 bool MouseLockedOrPending() const { |
| 437 return mouse_locked_ || pending_lock_request_ || pending_unlock_request_; | 458 return mouse_locked_ || pending_lock_request_ || pending_unlock_request_; |
| 438 } | 459 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 461 | 482 |
| 462 IDMap<AsyncOpenFileCallback> pending_async_open_files_; | 483 IDMap<AsyncOpenFileCallback> pending_async_open_files_; |
| 463 | 484 |
| 464 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_NetConnector_Impl>, | 485 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_NetConnector_Impl>, |
| 465 IDMapOwnPointer> pending_connect_tcps_; | 486 IDMapOwnPointer> pending_connect_tcps_; |
| 466 | 487 |
| 467 IDMap<webkit::ppapi::PPB_TCPSocket_Private_Impl> tcp_sockets_; | 488 IDMap<webkit::ppapi::PPB_TCPSocket_Private_Impl> tcp_sockets_; |
| 468 | 489 |
| 469 IDMap<webkit::ppapi::PPB_UDPSocket_Private_Impl> udp_sockets_; | 490 IDMap<webkit::ppapi::PPB_UDPSocket_Private_Impl> udp_sockets_; |
| 470 | 491 |
| 492 IDMap<webkit::ppapi::PPB_TCPServerSocket_Private_Impl> tcp_server_sockets_; |
| 493 |
| 471 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_Menu_Impl>, | 494 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_Menu_Impl>, |
| 472 IDMapOwnPointer> pending_context_menus_; | 495 IDMapOwnPointer> pending_context_menus_; |
| 473 | 496 |
| 474 typedef IDMap<scoped_refptr<PpapiBrokerImpl>, IDMapOwnPointer> BrokerMap; | 497 typedef IDMap<scoped_refptr<PpapiBrokerImpl>, IDMapOwnPointer> BrokerMap; |
| 475 BrokerMap pending_connect_broker_; | 498 BrokerMap pending_connect_broker_; |
| 476 | 499 |
| 477 // Whether or not the focus is on a PPAPI plugin | 500 // Whether or not the focus is on a PPAPI plugin |
| 478 webkit::ppapi::PluginInstance* focused_plugin_; | 501 webkit::ppapi::PluginInstance* focused_plugin_; |
| 479 | 502 |
| 480 // Current text input composition text. Empty if no composition is in | 503 // Current text input composition text. Empty if no composition is in |
| (...skipping 20 matching lines...) Expand all Loading... |
| 501 // |last_mouse_event_target_| is not owned by this class. We can know about | 524 // |last_mouse_event_target_| is not owned by this class. We can know about |
| 502 // when it is destroyed via InstanceDeleted(). | 525 // when it is destroyed via InstanceDeleted(). |
| 503 webkit::ppapi::PluginInstance* last_mouse_event_target_; | 526 webkit::ppapi::PluginInstance* last_mouse_event_target_; |
| 504 | 527 |
| 505 scoped_ptr<content::GamepadSharedMemoryReader> gamepad_shared_memory_reader_; | 528 scoped_ptr<content::GamepadSharedMemoryReader> gamepad_shared_memory_reader_; |
| 506 | 529 |
| 507 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); | 530 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); |
| 508 }; | 531 }; |
| 509 | 532 |
| 510 #endif // CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 533 #endif // CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
| OLD | NEW |