| 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 WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 namespace ppapi { | 72 namespace ppapi { |
| 73 | 73 |
| 74 class FileIO; | 74 class FileIO; |
| 75 class FullscreenContainer; | 75 class FullscreenContainer; |
| 76 class PepperFilePath; | 76 class PepperFilePath; |
| 77 class PluginInstance; | 77 class PluginInstance; |
| 78 class PluginModule; | 78 class PluginModule; |
| 79 class PPB_Broker_Impl; | 79 class PPB_Broker_Impl; |
| 80 class PPB_Flash_Menu_Impl; | 80 class PPB_Flash_Menu_Impl; |
| 81 class PPB_Flash_NetConnector_Impl; | 81 class PPB_Flash_NetConnector_Impl; |
| 82 class PPB_TCPServerSocket_Private_Impl; |
| 82 class PPB_TCPSocket_Private_Impl; | 83 class PPB_TCPSocket_Private_Impl; |
| 83 class PPB_UDPSocket_Private_Impl; | 84 class PPB_UDPSocket_Private_Impl; |
| 84 | 85 |
| 85 // Virtual interface that the browser implements to implement features for | 86 // Virtual interface that the browser implements to implement features for |
| 86 // PPAPI plugins. | 87 // PPAPI plugins. |
| 87 class PluginDelegate { | 88 class PluginDelegate { |
| 88 public: | 89 public: |
| 89 // This interface is used for the PluginModule to tell the code in charge of | 90 // This interface is used for the PluginModule to tell the code in charge of |
| 90 // re-using modules which modules currently exist. | 91 // re-using modules which modules currently exist. |
| 91 // | 92 // |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 virtual void TCPSocketConnectWithNetAddress( | 419 virtual void TCPSocketConnectWithNetAddress( |
| 419 PPB_TCPSocket_Private_Impl* socket, | 420 PPB_TCPSocket_Private_Impl* socket, |
| 420 uint32 socket_id, | 421 uint32 socket_id, |
| 421 const PP_NetAddress_Private& addr) = 0; | 422 const PP_NetAddress_Private& addr) = 0; |
| 422 virtual void TCPSocketSSLHandshake(uint32 socket_id, | 423 virtual void TCPSocketSSLHandshake(uint32 socket_id, |
| 423 const std::string& server_name, | 424 const std::string& server_name, |
| 424 uint16_t server_port) = 0; | 425 uint16_t server_port) = 0; |
| 425 virtual void TCPSocketRead(uint32 socket_id, int32_t bytes_to_read) = 0; | 426 virtual void TCPSocketRead(uint32 socket_id, int32_t bytes_to_read) = 0; |
| 426 virtual void TCPSocketWrite(uint32 socket_id, const std::string& buffer) = 0; | 427 virtual void TCPSocketWrite(uint32 socket_id, const std::string& buffer) = 0; |
| 427 virtual void TCPSocketDisconnect(uint32 socket_id) = 0; | 428 virtual void TCPSocketDisconnect(uint32 socket_id) = 0; |
| 429 virtual void TCPSocketRegister(PPB_TCPSocket_Private_Impl* socket, |
| 430 uint32 socket_id) = 0; |
| 428 | 431 |
| 429 // For PPB_UDPSocket_Private. | 432 // For PPB_UDPSocket_Private. |
| 430 virtual uint32 UDPSocketCreate() = 0; | 433 virtual uint32 UDPSocketCreate() = 0; |
| 431 virtual void UDPSocketBind(PPB_UDPSocket_Private_Impl* socket, | 434 virtual void UDPSocketBind(PPB_UDPSocket_Private_Impl* socket, |
| 432 uint32 socket_id, | 435 uint32 socket_id, |
| 433 const PP_NetAddress_Private& addr) = 0; | 436 const PP_NetAddress_Private& addr) = 0; |
| 434 virtual void UDPSocketRecvFrom(uint32 socket_id, int32_t num_bytes) = 0; | 437 virtual void UDPSocketRecvFrom(uint32 socket_id, int32_t num_bytes) = 0; |
| 435 virtual void UDPSocketSendTo(uint32 socket_id, | 438 virtual void UDPSocketSendTo(uint32 socket_id, |
| 436 const std::string& buffer, | 439 const std::string& buffer, |
| 437 const PP_NetAddress_Private& addr) = 0; | 440 const PP_NetAddress_Private& addr) = 0; |
| 438 virtual void UDPSocketClose(uint32 socket_id) = 0; | 441 virtual void UDPSocketClose(uint32 socket_id) = 0; |
| 439 | 442 |
| 443 // For PPB_TCPServerSocket_Private. |
| 444 virtual bool TCPServerSocketInitialize( |
| 445 PPB_TCPServerSocket_Private_Impl* socket) = 0; |
| 446 virtual void TCPServerSocketListen(PPB_TCPServerSocket_Private_Impl* socket, |
| 447 uint32 socket_id, |
| 448 const PP_NetAddress_Private& addr, |
| 449 int32_t backlog) = 0; |
| 450 virtual void TCPServerSocketAccept(uint32 socket_id) = 0; |
| 451 virtual void TCPServerSocketStopListening(uint32 socket_id) = 0; |
| 452 |
| 440 // Show the given context menu at the given position (in the plugin's | 453 // Show the given context menu at the given position (in the plugin's |
| 441 // coordinates). | 454 // coordinates). |
| 442 virtual int32_t ShowContextMenu( | 455 virtual int32_t ShowContextMenu( |
| 443 PluginInstance* instance, | 456 PluginInstance* instance, |
| 444 webkit::ppapi::PPB_Flash_Menu_Impl* menu, | 457 webkit::ppapi::PPB_Flash_Menu_Impl* menu, |
| 445 const gfx::Point& position) = 0; | 458 const gfx::Point& position) = 0; |
| 446 | 459 |
| 447 // Create a fullscreen container for a plugin instance. This effectively | 460 // Create a fullscreen container for a plugin instance. This effectively |
| 448 // switches the plugin to fullscreen. | 461 // switches the plugin to fullscreen. |
| 449 virtual FullscreenContainer* CreateFullscreenContainer( | 462 virtual FullscreenContainer* CreateFullscreenContainer( |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 virtual void SampleGamepads(WebKit::WebGamepads* data) = 0; | 536 virtual void SampleGamepads(WebKit::WebGamepads* data) = 0; |
| 524 | 537 |
| 525 // Returns true if the containing page is visible. | 538 // Returns true if the containing page is visible. |
| 526 virtual bool IsPageVisible() const = 0; | 539 virtual bool IsPageVisible() const = 0; |
| 527 }; | 540 }; |
| 528 | 541 |
| 529 } // namespace ppapi | 542 } // namespace ppapi |
| 530 } // namespace webkit | 543 } // namespace webkit |
| 531 | 544 |
| 532 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 545 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
| OLD | NEW |