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

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

Issue 8804006: Reland 8688002: PPB_TCPSocket_Private/PPB_UDPSocket_Private are exposed to Browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix destruction issue Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 namespace ppapi { 71 namespace ppapi {
72 72
73 class FileIO; 73 class FileIO;
74 class FullscreenContainer; 74 class FullscreenContainer;
75 class PepperFilePath; 75 class PepperFilePath;
76 class PluginInstance; 76 class PluginInstance;
77 class PluginModule; 77 class PluginModule;
78 class PPB_Broker_Impl; 78 class PPB_Broker_Impl;
79 class PPB_Flash_Menu_Impl; 79 class PPB_Flash_Menu_Impl;
80 class PPB_Flash_NetConnector_Impl; 80 class PPB_Flash_NetConnector_Impl;
81 class PPB_TCPSocket_Private_Impl;
82 class PPB_UDPSocket_Private_Impl;
81 83
82 // Virtual interface that the browser implements to implement features for 84 // Virtual interface that the browser implements to implement features for
83 // PPAPI plugins. 85 // PPAPI plugins.
84 class PluginDelegate { 86 class PluginDelegate {
85 public: 87 public:
86 // This interface is used for the PluginModule to tell the code in charge of 88 // This interface is used for the PluginModule to tell the code in charge of
87 // re-using modules which modules currently exist. 89 // re-using modules which modules currently exist.
88 // 90 //
89 // It is different than the other interfaces, which are scoped to the 91 // It is different than the other interfaces, which are scoped to the
90 // lifetime of the plugin instance. The implementor of this interface must 92 // lifetime of the plugin instance. The implementor of this interface must
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 GetFileThreadMessageLoopProxy() = 0; 401 GetFileThreadMessageLoopProxy() = 0;
400 402
401 virtual int32_t ConnectTcp( 403 virtual int32_t ConnectTcp(
402 webkit::ppapi::PPB_Flash_NetConnector_Impl* connector, 404 webkit::ppapi::PPB_Flash_NetConnector_Impl* connector,
403 const char* host, 405 const char* host,
404 uint16_t port) = 0; 406 uint16_t port) = 0;
405 virtual int32_t ConnectTcpAddress( 407 virtual int32_t ConnectTcpAddress(
406 webkit::ppapi::PPB_Flash_NetConnector_Impl* connector, 408 webkit::ppapi::PPB_Flash_NetConnector_Impl* connector,
407 const PP_NetAddress_Private* addr) = 0; 409 const PP_NetAddress_Private* addr) = 0;
408 410
411 // For PPB_TCPSocket_Private.
412 virtual uint32 TCPSocketCreate() = 0;
413 virtual void TCPSocketConnect(PPB_TCPSocket_Private_Impl* socket,
414 uint32 socket_id,
415 const std::string& host,
416 uint16_t port) = 0;
417 virtual void TCPSocketConnectWithNetAddress(
418 PPB_TCPSocket_Private_Impl* socket,
419 uint32 socket_id,
420 const PP_NetAddress_Private& addr) = 0;
421 virtual void TCPSocketSSLHandshake(uint32 socket_id,
422 const std::string& server_name,
423 uint16_t server_port) = 0;
424 virtual void TCPSocketRead(uint32 socket_id, int32_t bytes_to_read) = 0;
425 virtual void TCPSocketWrite(uint32 socket_id, const std::string& buffer) = 0;
426 virtual void TCPSocketDisconnect(uint32 socket_id) = 0;
427
428 // For PPB_UDPSocket_Private.
429 virtual uint32 UDPSocketCreate() = 0;
430 virtual void UDPSocketBind(PPB_UDPSocket_Private_Impl* socket,
431 uint32 socket_id,
432 const PP_NetAddress_Private& addr) = 0;
433 virtual void UDPSocketRecvFrom(uint32 socket_id, int32_t num_bytes) = 0;
434 virtual void UDPSocketSendTo(uint32 socket_id,
435 const std::string& buffer,
436 const PP_NetAddress_Private& addr) = 0;
437 virtual void UDPSocketClose(uint32 socket_id) = 0;
438
409 // Show the given context menu at the given position (in the plugin's 439 // Show the given context menu at the given position (in the plugin's
410 // coordinates). 440 // coordinates).
411 virtual int32_t ShowContextMenu( 441 virtual int32_t ShowContextMenu(
412 PluginInstance* instance, 442 PluginInstance* instance,
413 webkit::ppapi::PPB_Flash_Menu_Impl* menu, 443 webkit::ppapi::PPB_Flash_Menu_Impl* menu,
414 const gfx::Point& position) = 0; 444 const gfx::Point& position) = 0;
415 445
416 // Create a fullscreen container for a plugin instance. This effectively 446 // Create a fullscreen container for a plugin instance. This effectively
417 // switches the plugin to fullscreen. 447 // switches the plugin to fullscreen.
418 virtual FullscreenContainer* CreateFullscreenContainer( 448 virtual FullscreenContainer* CreateFullscreenContainer(
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 virtual void DidReceiveMouseEvent(PluginInstance* instance) = 0; 513 virtual void DidReceiveMouseEvent(PluginInstance* instance) = 0;
484 514
485 // Determines if the browser entered fullscreen mode. 515 // Determines if the browser entered fullscreen mode.
486 virtual bool IsInFullscreenMode() = 0; 516 virtual bool IsInFullscreenMode() = 0;
487 }; 517 };
488 518
489 } // namespace ppapi 519 } // namespace ppapi
490 } // namespace webkit 520 } // namespace webkit
491 521
492 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ 522 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/mock_plugin_delegate.cc ('k') | webkit/plugins/ppapi/ppb_tcp_socket_private_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698