| 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_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
| 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 6 #define CONTENT_RENDERER_PEPPER_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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket, | 330 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket, |
| 331 uint32 socket_id, | 331 uint32 socket_id, |
| 332 const PP_NetAddress_Private& addr) OVERRIDE; | 332 const PP_NetAddress_Private& addr) OVERRIDE; |
| 333 virtual void TCPSocketSSLHandshake(uint32 socket_id, | 333 virtual void TCPSocketSSLHandshake(uint32 socket_id, |
| 334 const std::string& server_name, | 334 const std::string& server_name, |
| 335 uint16_t server_port) OVERRIDE; | 335 uint16_t server_port) OVERRIDE; |
| 336 virtual void TCPSocketRead(uint32 socket_id, int32_t bytes_to_read) OVERRIDE; | 336 virtual void TCPSocketRead(uint32 socket_id, int32_t bytes_to_read) OVERRIDE; |
| 337 virtual void TCPSocketWrite(uint32 socket_id, | 337 virtual void TCPSocketWrite(uint32 socket_id, |
| 338 const std::string& buffer) OVERRIDE; | 338 const std::string& buffer) OVERRIDE; |
| 339 virtual void TCPSocketDisconnect(uint32 socket_id) OVERRIDE; | 339 virtual void TCPSocketDisconnect(uint32 socket_id) OVERRIDE; |
| 340 virtual void RegisterTCPSocket( |
| 341 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket, |
| 342 uint32 socket_id) OVERRIDE; |
| 340 | 343 |
| 341 virtual uint32 UDPSocketCreate() OVERRIDE; | 344 virtual uint32 UDPSocketCreate() OVERRIDE; |
| 342 virtual void UDPSocketBind( | 345 virtual void UDPSocketBind( |
| 343 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket, | 346 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket, |
| 344 uint32 socket_id, | 347 uint32 socket_id, |
| 345 const PP_NetAddress_Private& addr) OVERRIDE; | 348 const PP_NetAddress_Private& addr) OVERRIDE; |
| 346 virtual void UDPSocketRecvFrom(uint32 socket_id, | 349 virtual void UDPSocketRecvFrom(uint32 socket_id, |
| 347 int32_t num_bytes) OVERRIDE; | 350 int32_t num_bytes) OVERRIDE; |
| 348 virtual void UDPSocketSendTo(uint32 socket_id, | 351 virtual void UDPSocketSendTo(uint32 socket_id, |
| 349 const std::string& buffer, | 352 const std::string& buffer, |
| 350 const PP_NetAddress_Private& addr) OVERRIDE; | 353 const PP_NetAddress_Private& addr) OVERRIDE; |
| 351 virtual void UDPSocketClose(uint32 socket_id) OVERRIDE; | 354 virtual void UDPSocketClose(uint32 socket_id) OVERRIDE; |
| 355 virtual void TCPServerSocketListen( |
| 356 webkit::ppapi::PPB_TCPServerSocket_Private_Impl* socket, |
| 357 uint32 temp_socket_id, |
| 358 const PP_NetAddress_Private& addr, |
| 359 int32_t backlog) OVERRIDE; |
| 360 virtual void TCPServerSocketAccept(uint32 real_socket_id) OVERRIDE; |
| 361 virtual void TCPServerSocketStopListening(uint32 real_socket_id, |
| 362 uint32 temp_socket_id) OVERRIDE; |
| 352 | 363 |
| 353 virtual int32_t ShowContextMenu( | 364 virtual int32_t ShowContextMenu( |
| 354 webkit::ppapi::PluginInstance* instance, | 365 webkit::ppapi::PluginInstance* instance, |
| 355 webkit::ppapi::PPB_Flash_Menu_Impl* menu, | 366 webkit::ppapi::PPB_Flash_Menu_Impl* menu, |
| 356 const gfx::Point& position) OVERRIDE; | 367 const gfx::Point& position) OVERRIDE; |
| 357 void OnContextMenuClosed( | 368 void OnContextMenuClosed( |
| 358 const content::CustomContextMenuContext& custom_context); | 369 const content::CustomContextMenuContext& custom_context); |
| 359 void OnCustomContextMenuAction( | 370 void OnCustomContextMenuAction( |
| 360 const content::CustomContextMenuContext& custom_context, | 371 const content::CustomContextMenuContext& custom_context, |
| 361 unsigned action); | 372 unsigned action); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 const PP_NetAddress_Private& addr); | 431 const PP_NetAddress_Private& addr); |
| 421 void OnUDPSocketSendToACK(uint32 plugin_dispatcher_id, | 432 void OnUDPSocketSendToACK(uint32 plugin_dispatcher_id, |
| 422 uint32 socket_id, | 433 uint32 socket_id, |
| 423 bool succeeded, | 434 bool succeeded, |
| 424 int32_t bytes_written); | 435 int32_t bytes_written); |
| 425 void OnUDPSocketRecvFromACK(uint32 plugin_dispatcher_id, | 436 void OnUDPSocketRecvFromACK(uint32 plugin_dispatcher_id, |
| 426 uint32 socket_id, | 437 uint32 socket_id, |
| 427 bool succeeded, | 438 bool succeeded, |
| 428 const std::string& data, | 439 const std::string& data, |
| 429 const PP_NetAddress_Private& addr); | 440 const PP_NetAddress_Private& addr); |
| 441 void OnTCPServerSocketListenACK(uint32 plugin_dispatcher_id, |
| 442 uint32 real_socket_id, |
| 443 uint32 temp_socket_id, |
| 444 int32_t status); |
| 445 void OnTCPServerSocketAcceptACK(uint32 plugin_dispatcher_id, |
| 446 uint32 real_server_socket_id, |
| 447 uint32 accepted_socket_id, |
| 448 const PP_NetAddress_Private& local_addr, |
| 449 const PP_NetAddress_Private& remote_addr); |
| 430 | 450 |
| 431 CONTENT_EXPORT int GetRoutingId() const; | 451 CONTENT_EXPORT int GetRoutingId() const; |
| 432 | 452 |
| 433 typedef base::Callback<void (int /* request_id */, | 453 typedef base::Callback<void (int /* request_id */, |
| 434 bool /* succeeded */, | 454 bool /* succeeded */, |
| 435 const std::string& /* label */)> | 455 const std::string& /* label */)> |
| 436 OpenDeviceCallback; | 456 OpenDeviceCallback; |
| 437 | 457 |
| 438 // Opens the specified device. The request ID passed into the callback will be | 458 // Opens the specified device. The request ID passed into the callback will be |
| 439 // the same as the return value. If successful, the label passed into the | 459 // the same as the return value. If successful, the label passed into the |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 | 494 |
| 475 IDMap<AsyncOpenFileCallback> pending_async_open_files_; | 495 IDMap<AsyncOpenFileCallback> pending_async_open_files_; |
| 476 | 496 |
| 477 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_NetConnector_Impl>, | 497 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_NetConnector_Impl>, |
| 478 IDMapOwnPointer> pending_connect_tcps_; | 498 IDMapOwnPointer> pending_connect_tcps_; |
| 479 | 499 |
| 480 IDMap<webkit::ppapi::PPB_TCPSocket_Private_Impl> tcp_sockets_; | 500 IDMap<webkit::ppapi::PPB_TCPSocket_Private_Impl> tcp_sockets_; |
| 481 | 501 |
| 482 IDMap<webkit::ppapi::PPB_UDPSocket_Private_Impl> udp_sockets_; | 502 IDMap<webkit::ppapi::PPB_UDPSocket_Private_Impl> udp_sockets_; |
| 483 | 503 |
| 504 IDMap<webkit::ppapi::PPB_TCPServerSocket_Private_Impl> tcp_server_sockets_; |
| 505 |
| 506 IDMap<webkit::ppapi::PPB_TCPServerSocket_Private_Impl> |
| 507 uninitialized_tcp_server_sockets_; |
| 508 |
| 484 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_Menu_Impl>, | 509 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_Menu_Impl>, |
| 485 IDMapOwnPointer> pending_context_menus_; | 510 IDMapOwnPointer> pending_context_menus_; |
| 486 | 511 |
| 487 typedef IDMap<scoped_refptr<PpapiBrokerImpl>, IDMapOwnPointer> BrokerMap; | 512 typedef IDMap<scoped_refptr<PpapiBrokerImpl>, IDMapOwnPointer> BrokerMap; |
| 488 BrokerMap pending_connect_broker_; | 513 BrokerMap pending_connect_broker_; |
| 489 | 514 |
| 490 // Whether or not the focus is on a PPAPI plugin | 515 // Whether or not the focus is on a PPAPI plugin |
| 491 webkit::ppapi::PluginInstance* focused_plugin_; | 516 webkit::ppapi::PluginInstance* focused_plugin_; |
| 492 | 517 |
| 493 // Current text input composition text. Empty if no composition is in | 518 // Current text input composition text. Empty if no composition is in |
| 494 // progress. | 519 // progress. |
| 495 string16 composition_text_; | 520 string16 composition_text_; |
| 496 | 521 |
| 497 // The plugin instance that received the last mouse event. It is set to NULL | 522 // The plugin instance that received the last mouse event. It is set to NULL |
| 498 // if the last mouse event went to elements other than Pepper plugins. | 523 // if the last mouse event went to elements other than Pepper plugins. |
| 499 // |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 |
| 500 // when it is destroyed via InstanceDeleted(). | 525 // when it is destroyed via InstanceDeleted(). |
| 501 webkit::ppapi::PluginInstance* last_mouse_event_target_; | 526 webkit::ppapi::PluginInstance* last_mouse_event_target_; |
| 502 | 527 |
| 503 scoped_ptr<content::GamepadSharedMemoryReader> gamepad_shared_memory_reader_; | 528 scoped_ptr<content::GamepadSharedMemoryReader> gamepad_shared_memory_reader_; |
| 504 | 529 |
| 505 scoped_ptr<DeviceEnumerationEventHandler> device_enumeration_event_handler_; | 530 scoped_ptr<DeviceEnumerationEventHandler> device_enumeration_event_handler_; |
| 506 | 531 |
| 507 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); | 532 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); |
| 508 }; | 533 }; |
| 509 | 534 |
| 510 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 535 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
| OLD | NEW |