OLD | NEW |
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 CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
6 #define CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 6 #define CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <map> | 10 #include <map> |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 uint16_t port) OVERRIDE; | 303 uint16_t port) OVERRIDE; |
304 virtual int32_t ConnectTcpAddress( | 304 virtual int32_t ConnectTcpAddress( |
305 webkit::ppapi::PPB_Flash_NetConnector_Impl* connector, | 305 webkit::ppapi::PPB_Flash_NetConnector_Impl* connector, |
306 const struct PP_NetAddress_Private* addr) OVERRIDE; | 306 const struct PP_NetAddress_Private* addr) OVERRIDE; |
307 // This is the completion for both |ConnectTcp()| and |ConnectTcpAddress()|. | 307 // This is the completion for both |ConnectTcp()| and |ConnectTcpAddress()|. |
308 void OnConnectTcpACK( | 308 void OnConnectTcpACK( |
309 int request_id, | 309 int request_id, |
310 base::PlatformFile socket, | 310 base::PlatformFile socket, |
311 const PP_NetAddress_Private& local_addr, | 311 const PP_NetAddress_Private& local_addr, |
312 const PP_NetAddress_Private& remote_addr); | 312 const PP_NetAddress_Private& remote_addr); |
| 313 |
| 314 virtual uint32 TCPSocketCreate() OVERRIDE; |
| 315 virtual void TCPSocketConnect( |
| 316 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket, |
| 317 uint32 socket_id, |
| 318 const std::string& host, |
| 319 uint16_t port) OVERRIDE; |
| 320 virtual void TCPSocketConnectWithNetAddress( |
| 321 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket, |
| 322 uint32 socket_id, |
| 323 const PP_NetAddress_Private& addr) OVERRIDE; |
| 324 void OnTCPSocketConnectACK(uint32 socket_id, |
| 325 bool succeeded, |
| 326 const PP_NetAddress_Private& local_addr, |
| 327 const PP_NetAddress_Private& remote_addr); |
| 328 |
| 329 virtual void TCPSocketSSLHandshake(uint32 socket_id, |
| 330 const std::string& server_name, |
| 331 uint16_t server_port) OVERRIDE; |
| 332 void OnTCPSocketSSLHandshakeACK(uint32 socket_id, bool succeeded); |
| 333 |
| 334 virtual void TCPSocketRead(uint32 socket_id, int32_t bytes_to_read) OVERRIDE; |
| 335 void OnTCPSocketReadACK(uint32 socket_id, |
| 336 bool succeeded, |
| 337 const std::string& data); |
| 338 |
| 339 virtual void TCPSocketWrite(uint32 socket_id, |
| 340 const std::string& buffer) OVERRIDE; |
| 341 void OnTCPSocketWriteACK(uint32 socket_id, |
| 342 bool succeeded, |
| 343 int32_t bytes_written); |
| 344 |
| 345 virtual void TCPSocketDisconnect(uint32 socket_id) OVERRIDE; |
| 346 |
| 347 virtual uint32 UDPSocketCreate() OVERRIDE; |
| 348 |
| 349 virtual void UDPSocketBind( |
| 350 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket, |
| 351 uint32 socket_id, |
| 352 const PP_NetAddress_Private& addr) OVERRIDE; |
| 353 void OnUDPSocketBindACK(uint32 socket_id, bool succeeded); |
| 354 |
| 355 virtual void UDPSocketRecvFrom(uint32 socket_id, |
| 356 int32_t num_bytes) OVERRIDE; |
| 357 void OnUDPSocketRecvFromACK(uint32 socket_id, |
| 358 bool succeeded, |
| 359 const std::string& data, |
| 360 const PP_NetAddress_Private& remote_addr); |
| 361 |
| 362 virtual void UDPSocketSendTo(uint32 socket_id, |
| 363 const std::string& buffer, |
| 364 const PP_NetAddress_Private& addr) OVERRIDE; |
| 365 void OnUDPSocketSendToACK(uint32 socket_id, |
| 366 bool succeeded, |
| 367 int32_t bytes_written); |
| 368 |
| 369 virtual void UDPSocketClose(uint32 socket_id) OVERRIDE; |
| 370 |
313 virtual int32_t ShowContextMenu( | 371 virtual int32_t ShowContextMenu( |
314 webkit::ppapi::PluginInstance* instance, | 372 webkit::ppapi::PluginInstance* instance, |
315 webkit::ppapi::PPB_Flash_Menu_Impl* menu, | 373 webkit::ppapi::PPB_Flash_Menu_Impl* menu, |
316 const gfx::Point& position) OVERRIDE; | 374 const gfx::Point& position) OVERRIDE; |
317 void OnContextMenuClosed( | 375 void OnContextMenuClosed( |
318 const webkit_glue::CustomContextMenuContext& custom_context); | 376 const webkit_glue::CustomContextMenuContext& custom_context); |
319 void OnCustomContextMenuAction( | 377 void OnCustomContextMenuAction( |
320 const webkit_glue::CustomContextMenuContext& custom_context, | 378 const webkit_glue::CustomContextMenuContext& custom_context, |
321 unsigned action); | 379 unsigned action); |
322 void CompleteShowContextMenu(int request_id, | 380 void CompleteShowContextMenu(int request_id, |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 | 427 |
370 // Used to send a single context menu "completion" upon menu close. | 428 // Used to send a single context menu "completion" upon menu close. |
371 bool has_saved_context_menu_action_; | 429 bool has_saved_context_menu_action_; |
372 unsigned saved_context_menu_action_; | 430 unsigned saved_context_menu_action_; |
373 | 431 |
374 IDMap<AsyncOpenFileCallback> pending_async_open_files_; | 432 IDMap<AsyncOpenFileCallback> pending_async_open_files_; |
375 | 433 |
376 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_NetConnector_Impl>, | 434 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_NetConnector_Impl>, |
377 IDMapOwnPointer> pending_connect_tcps_; | 435 IDMapOwnPointer> pending_connect_tcps_; |
378 | 436 |
| 437 IDMap<scoped_refptr<webkit::ppapi::PPB_TCPSocket_Private_Impl>, |
| 438 IDMapOwnPointer> tcp_sockets_; |
| 439 |
| 440 IDMap<scoped_refptr<webkit::ppapi::PPB_UDPSocket_Private_Impl>, |
| 441 IDMapOwnPointer> udp_sockets_; |
| 442 |
379 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_Menu_Impl>, | 443 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_Menu_Impl>, |
380 IDMapOwnPointer> pending_context_menus_; | 444 IDMapOwnPointer> pending_context_menus_; |
381 | 445 |
382 typedef IDMap<scoped_refptr<PpapiBrokerImpl>, IDMapOwnPointer> BrokerMap; | 446 typedef IDMap<scoped_refptr<PpapiBrokerImpl>, IDMapOwnPointer> BrokerMap; |
383 BrokerMap pending_connect_broker_; | 447 BrokerMap pending_connect_broker_; |
384 | 448 |
385 // Whether or not the focus is on a PPAPI plugin | 449 // Whether or not the focus is on a PPAPI plugin |
386 webkit::ppapi::PluginInstance* focused_plugin_; | 450 webkit::ppapi::PluginInstance* focused_plugin_; |
387 | 451 |
388 // Current text input composition text. Empty if no composition is in | 452 // Current text input composition text. Empty if no composition is in |
(...skipping 18 matching lines...) Expand all Loading... |
407 // The plugin instance that received the last mouse event. It is set to NULL | 471 // The plugin instance that received the last mouse event. It is set to NULL |
408 // if the last mouse event went to elements other than Pepper plugins. | 472 // if the last mouse event went to elements other than Pepper plugins. |
409 // |last_mouse_event_target_| is not owned by this class. We can know about | 473 // |last_mouse_event_target_| is not owned by this class. We can know about |
410 // when it is destroyed via InstanceDeleted(). | 474 // when it is destroyed via InstanceDeleted(). |
411 webkit::ppapi::PluginInstance* last_mouse_event_target_; | 475 webkit::ppapi::PluginInstance* last_mouse_event_target_; |
412 | 476 |
413 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); | 477 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); |
414 }; | 478 }; |
415 | 479 |
416 #endif // CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 480 #endif // CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
OLD | NEW |