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

Side by Side Diff: webkit/plugins/ppapi/plugin_delegate.h

Issue 9283022: Exposed Listen and Accept methods to plugin. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Sync. 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
« no previous file with comments | « webkit/plugins/ppapi/mock_plugin_delegate.cc ('k') | webkit/plugins/ppapi/plugin_module.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 namespace ppapi { 75 namespace ppapi {
76 76
77 class FileIO; 77 class FileIO;
78 class FullscreenContainer; 78 class FullscreenContainer;
79 class PepperFilePath; 79 class PepperFilePath;
80 class PluginInstance; 80 class PluginInstance;
81 class PluginModule; 81 class PluginModule;
82 class PPB_Broker_Impl; 82 class PPB_Broker_Impl;
83 class PPB_Flash_Menu_Impl; 83 class PPB_Flash_Menu_Impl;
84 class PPB_Flash_NetConnector_Impl; 84 class PPB_Flash_NetConnector_Impl;
85 class PPB_TCPServerSocket_Private_Impl;
85 class PPB_TCPSocket_Private_Impl; 86 class PPB_TCPSocket_Private_Impl;
86 class PPB_UDPSocket_Private_Impl; 87 class PPB_UDPSocket_Private_Impl;
87 88
88 // Virtual interface that the browser implements to implement features for 89 // Virtual interface that the browser implements to implement features for
89 // PPAPI plugins. 90 // PPAPI plugins.
90 class PluginDelegate { 91 class PluginDelegate {
91 public: 92 public:
92 // This interface is used for the PluginModule to tell the code in charge of 93 // This interface is used for the PluginModule to tell the code in charge of
93 // re-using modules which modules currently exist. 94 // re-using modules which modules currently exist.
94 // 95 //
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 virtual void TCPSocketConnectWithNetAddress( 446 virtual void TCPSocketConnectWithNetAddress(
446 PPB_TCPSocket_Private_Impl* socket, 447 PPB_TCPSocket_Private_Impl* socket,
447 uint32 socket_id, 448 uint32 socket_id,
448 const PP_NetAddress_Private& addr) = 0; 449 const PP_NetAddress_Private& addr) = 0;
449 virtual void TCPSocketSSLHandshake(uint32 socket_id, 450 virtual void TCPSocketSSLHandshake(uint32 socket_id,
450 const std::string& server_name, 451 const std::string& server_name,
451 uint16_t server_port) = 0; 452 uint16_t server_port) = 0;
452 virtual void TCPSocketRead(uint32 socket_id, int32_t bytes_to_read) = 0; 453 virtual void TCPSocketRead(uint32 socket_id, int32_t bytes_to_read) = 0;
453 virtual void TCPSocketWrite(uint32 socket_id, const std::string& buffer) = 0; 454 virtual void TCPSocketWrite(uint32 socket_id, const std::string& buffer) = 0;
454 virtual void TCPSocketDisconnect(uint32 socket_id) = 0; 455 virtual void TCPSocketDisconnect(uint32 socket_id) = 0;
456 virtual void RegisterTCPSocket(PPB_TCPSocket_Private_Impl* socket,
457 uint32 socket_id) = 0;
455 458
456 // For PPB_UDPSocket_Private. 459 // For PPB_UDPSocket_Private.
457 virtual uint32 UDPSocketCreate() = 0; 460 virtual uint32 UDPSocketCreate() = 0;
458 virtual void UDPSocketBind(PPB_UDPSocket_Private_Impl* socket, 461 virtual void UDPSocketBind(PPB_UDPSocket_Private_Impl* socket,
459 uint32 socket_id, 462 uint32 socket_id,
460 const PP_NetAddress_Private& addr) = 0; 463 const PP_NetAddress_Private& addr) = 0;
461 virtual void UDPSocketRecvFrom(uint32 socket_id, int32_t num_bytes) = 0; 464 virtual void UDPSocketRecvFrom(uint32 socket_id, int32_t num_bytes) = 0;
462 virtual void UDPSocketSendTo(uint32 socket_id, 465 virtual void UDPSocketSendTo(uint32 socket_id,
463 const std::string& buffer, 466 const std::string& buffer,
464 const PP_NetAddress_Private& addr) = 0; 467 const PP_NetAddress_Private& addr) = 0;
465 virtual void UDPSocketClose(uint32 socket_id) = 0; 468 virtual void UDPSocketClose(uint32 socket_id) = 0;
466 469
470 // For PPB_TCPServerSocket_Private.
471 virtual void TCPServerSocketListen(PPB_TCPServerSocket_Private_Impl* socket,
472 uint32 temp_socket_id,
473 const PP_NetAddress_Private& addr,
474 int32_t backlog) = 0;
475 virtual void TCPServerSocketAccept(uint32 real_socket_id) = 0;
476 virtual void TCPServerSocketStopListening(uint32 real_socket_id,
477 uint32 temp_socket_id) = 0;
478
467 // Show the given context menu at the given position (in the plugin's 479 // Show the given context menu at the given position (in the plugin's
468 // coordinates). 480 // coordinates).
469 virtual int32_t ShowContextMenu( 481 virtual int32_t ShowContextMenu(
470 PluginInstance* instance, 482 PluginInstance* instance,
471 webkit::ppapi::PPB_Flash_Menu_Impl* menu, 483 webkit::ppapi::PPB_Flash_Menu_Impl* menu,
472 const gfx::Point& position) = 0; 484 const gfx::Point& position) = 0;
473 485
474 // Create a fullscreen container for a plugin instance. This effectively 486 // Create a fullscreen container for a plugin instance. This effectively
475 // switches the plugin to fullscreen. 487 // switches the plugin to fullscreen.
476 virtual FullscreenContainer* CreateFullscreenContainer( 488 virtual FullscreenContainer* CreateFullscreenContainer(
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 // Enumerates devices of the specified type. The request ID passed into the 573 // Enumerates devices of the specified type. The request ID passed into the
562 // callback will be the same as the return value. 574 // callback will be the same as the return value.
563 virtual int EnumerateDevices(PP_DeviceType_Dev type, 575 virtual int EnumerateDevices(PP_DeviceType_Dev type,
564 const EnumerateDevicesCallback& callback) = 0; 576 const EnumerateDevicesCallback& callback) = 0;
565 }; 577 };
566 578
567 } // namespace ppapi 579 } // namespace ppapi
568 } // namespace webkit 580 } // namespace webkit
569 581
570 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ 582 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/mock_plugin_delegate.cc ('k') | webkit/plugins/ppapi/plugin_module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698