| 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 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 namespace ppapi { | 93 namespace ppapi { |
| 94 | 94 |
| 95 class FileIO; | 95 class FileIO; |
| 96 class FullscreenContainer; | 96 class FullscreenContainer; |
| 97 class PluginInstance; | 97 class PluginInstance; |
| 98 class PluginModule; | 98 class PluginModule; |
| 99 class PPB_Broker_Impl; | 99 class PPB_Broker_Impl; |
| 100 class PPB_Flash_Menu_Impl; | 100 class PPB_Flash_Menu_Impl; |
| 101 class PPB_ImageData_Impl; | 101 class PPB_ImageData_Impl; |
| 102 class PPB_TCPSocket_Private_Impl; | 102 class PPB_TCPSocket_Private_Impl; |
| 103 class PPB_UDPSocket_Private_Impl; | |
| 104 | 103 |
| 105 // Virtual interface that the browser implements to implement features for | 104 // Virtual interface that the browser implements to implement features for |
| 106 // PPAPI plugins. | 105 // PPAPI plugins. |
| 107 class PluginDelegate { | 106 class PluginDelegate { |
| 108 public: | 107 public: |
| 109 // This interface is used for the PluginModule to tell the code in charge of | 108 // This interface is used for the PluginModule to tell the code in charge of |
| 110 // re-using modules which modules currently exist. | 109 // re-using modules which modules currently exist. |
| 111 // | 110 // |
| 112 // It is different than the other interfaces, which are scoped to the | 111 // It is different than the other interfaces, which are scoped to the |
| 113 // lifetime of the plugin instance. The implementor of this interface must | 112 // lifetime of the plugin instance. The implementor of this interface must |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 const std::string& server_name, | 537 const std::string& server_name, |
| 539 uint16_t server_port, | 538 uint16_t server_port, |
| 540 const std::vector<std::vector<char> >& trusted_certs, | 539 const std::vector<std::vector<char> >& trusted_certs, |
| 541 const std::vector<std::vector<char> >& untrusted_certs) = 0; | 540 const std::vector<std::vector<char> >& untrusted_certs) = 0; |
| 542 virtual void TCPSocketRead(uint32 socket_id, int32_t bytes_to_read) = 0; | 541 virtual void TCPSocketRead(uint32 socket_id, int32_t bytes_to_read) = 0; |
| 543 virtual void TCPSocketWrite(uint32 socket_id, const std::string& buffer) = 0; | 542 virtual void TCPSocketWrite(uint32 socket_id, const std::string& buffer) = 0; |
| 544 virtual void TCPSocketDisconnect(uint32 socket_id) = 0; | 543 virtual void TCPSocketDisconnect(uint32 socket_id) = 0; |
| 545 virtual void RegisterTCPSocket(PPB_TCPSocket_Private_Impl* socket, | 544 virtual void RegisterTCPSocket(PPB_TCPSocket_Private_Impl* socket, |
| 546 uint32 socket_id) = 0; | 545 uint32 socket_id) = 0; |
| 547 | 546 |
| 548 // For PPB_UDPSocket_Private. | |
| 549 virtual uint32 UDPSocketCreate() = 0; | |
| 550 virtual void UDPSocketSetBoolSocketFeature(PPB_UDPSocket_Private_Impl* socket, | |
| 551 uint32 socket_id, | |
| 552 int32_t name, | |
| 553 bool value) = 0; | |
| 554 virtual void UDPSocketBind(PPB_UDPSocket_Private_Impl* socket, | |
| 555 uint32 socket_id, | |
| 556 const PP_NetAddress_Private& addr) = 0; | |
| 557 virtual void UDPSocketRecvFrom(uint32 socket_id, int32_t num_bytes) = 0; | |
| 558 virtual void UDPSocketSendTo(uint32 socket_id, | |
| 559 const std::string& buffer, | |
| 560 const PP_NetAddress_Private& addr) = 0; | |
| 561 virtual void UDPSocketClose(uint32 socket_id) = 0; | |
| 562 | |
| 563 // For PPB_TCPServerSocket_Private. | 547 // For PPB_TCPServerSocket_Private. |
| 564 virtual void TCPServerSocketListen(PP_Resource socket_resource, | 548 virtual void TCPServerSocketListen(PP_Resource socket_resource, |
| 565 const PP_NetAddress_Private& addr, | 549 const PP_NetAddress_Private& addr, |
| 566 int32_t backlog) = 0; | 550 int32_t backlog) = 0; |
| 567 virtual void TCPServerSocketAccept(uint32 server_socket_id) = 0; | 551 virtual void TCPServerSocketAccept(uint32 server_socket_id) = 0; |
| 568 virtual void TCPServerSocketStopListening( | 552 virtual void TCPServerSocketStopListening( |
| 569 PP_Resource socket_resource, | 553 PP_Resource socket_resource, |
| 570 uint32 socket_id) = 0; | 554 uint32 socket_id) = 0; |
| 571 | 555 |
| 572 // For PPB_HostResolver_Private. | 556 // For PPB_HostResolver_Private. |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 const EnumerateDevicesCallback& callback) = 0; | 654 const EnumerateDevicesCallback& callback) = 0; |
| 671 // Stop enumerating devices of the specified |request_id|. The |request_id| | 655 // Stop enumerating devices of the specified |request_id|. The |request_id| |
| 672 // is the return value of EnumerateDevicesCallback. | 656 // is the return value of EnumerateDevicesCallback. |
| 673 virtual void StopEnumerateDevices(int request_id) = 0; | 657 virtual void StopEnumerateDevices(int request_id) = 0; |
| 674 }; | 658 }; |
| 675 | 659 |
| 676 } // namespace ppapi | 660 } // namespace ppapi |
| 677 } // namespace webkit | 661 } // namespace webkit |
| 678 | 662 |
| 679 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 663 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
| OLD | NEW |