| 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 CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
| 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "base/id_map.h" | 14 #include "base/id_map.h" |
| 15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
| 18 #include "base/observer_list.h" | 18 #include "base/observer_list.h" |
| 19 #include "content/common/content_export.h" | 19 #include "content/common/content_export.h" |
| 20 #include "content/public/renderer/render_view_observer.h" | 20 #include "content/public/renderer/render_view_observer.h" |
| 21 #include "content/renderer/mouse_lock_dispatcher.h" | 21 #include "content/renderer/mouse_lock_dispatcher.h" |
| 22 #include "content/renderer/pepper/pepper_parent_context_provider.h" | 22 #include "content/renderer/pepper/pepper_parent_context_provider.h" |
| 23 #include "ppapi/shared_impl/private/ppb_host_resolver_shared.h" | 23 #include "ppapi/shared_impl/private/ppb_host_resolver_shared.h" |
| 24 #include "ppapi/shared_impl/private/ppb_tcp_server_socket_shared.h" |
| 24 #include "ppapi/shared_impl/private/tcp_socket_private_impl.h" | 25 #include "ppapi/shared_impl/private/tcp_socket_private_impl.h" |
| 25 #include "ppapi/shared_impl/private/udp_socket_private_impl.h" | 26 #include "ppapi/shared_impl/private/udp_socket_private_impl.h" |
| 26 #include "ui/base/ime/text_input_type.h" | 27 #include "ui/base/ime/text_input_type.h" |
| 27 #include "webkit/plugins/ppapi/plugin_delegate.h" | 28 #include "webkit/plugins/ppapi/plugin_delegate.h" |
| 28 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" | 29 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" |
| 29 | 30 |
| 30 class FilePath; | 31 class FilePath; |
| 31 class PepperBrokerImpl; | 32 class PepperBrokerImpl; |
| 32 class PepperDeviceEnumerationEventHandler; | 33 class PepperDeviceEnumerationEventHandler; |
| 33 class PepperPluginDelegateImpl; | 34 class PepperPluginDelegateImpl; |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket, | 288 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket, |
| 288 uint32 socket_id, | 289 uint32 socket_id, |
| 289 const PP_NetAddress_Private& addr) OVERRIDE; | 290 const PP_NetAddress_Private& addr) OVERRIDE; |
| 290 virtual void UDPSocketRecvFrom(uint32 socket_id, | 291 virtual void UDPSocketRecvFrom(uint32 socket_id, |
| 291 int32_t num_bytes) OVERRIDE; | 292 int32_t num_bytes) OVERRIDE; |
| 292 virtual void UDPSocketSendTo(uint32 socket_id, | 293 virtual void UDPSocketSendTo(uint32 socket_id, |
| 293 const std::string& buffer, | 294 const std::string& buffer, |
| 294 const PP_NetAddress_Private& addr) OVERRIDE; | 295 const PP_NetAddress_Private& addr) OVERRIDE; |
| 295 virtual void UDPSocketClose(uint32 socket_id) OVERRIDE; | 296 virtual void UDPSocketClose(uint32 socket_id) OVERRIDE; |
| 296 virtual void TCPServerSocketListen( | 297 virtual void TCPServerSocketListen( |
| 297 webkit::ppapi::PPB_TCPServerSocket_Private_Impl* socket, | 298 PP_Resource socket_resource, |
| 298 uint32 temp_socket_id, | |
| 299 const PP_NetAddress_Private& addr, | 299 const PP_NetAddress_Private& addr, |
| 300 int32_t backlog) OVERRIDE; | 300 int32_t backlog) OVERRIDE; |
| 301 virtual void TCPServerSocketAccept(uint32 real_socket_id) OVERRIDE; | 301 virtual void TCPServerSocketAccept(uint32 server_socket_id) OVERRIDE; |
| 302 virtual void TCPServerSocketStopListening(uint32 real_socket_id, | 302 virtual void TCPServerSocketStopListening( |
| 303 uint32 temp_socket_id) OVERRIDE; | 303 PP_Resource socket_resource, |
| 304 uint32 socket_id) OVERRIDE; |
| 304 | 305 |
| 305 virtual void RegisterHostResolver( | 306 virtual void RegisterHostResolver( |
| 306 ppapi::PPB_HostResolver_Shared* host_resolver, | 307 ppapi::PPB_HostResolver_Shared* host_resolver, |
| 307 uint32 host_resolver_id) OVERRIDE; | 308 uint32 host_resolver_id) OVERRIDE; |
| 308 virtual void HostResolverResolve( | 309 virtual void HostResolverResolve( |
| 309 uint32 host_resolver_id, | 310 uint32 host_resolver_id, |
| 310 const ::ppapi::HostPortPair& host_port, | 311 const ::ppapi::HostPortPair& host_port, |
| 311 const PP_HostResolver_Private_Hint* hint) OVERRIDE; | 312 const PP_HostResolver_Private_Hint* hint) OVERRIDE; |
| 312 virtual void UnregisterHostResolver(uint32 host_resolver_id) OVERRIDE; | 313 virtual void UnregisterHostResolver(uint32 host_resolver_id) OVERRIDE; |
| 313 | 314 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 void OnUDPSocketSendToACK(uint32 plugin_dispatcher_id, | 389 void OnUDPSocketSendToACK(uint32 plugin_dispatcher_id, |
| 389 uint32 socket_id, | 390 uint32 socket_id, |
| 390 bool succeeded, | 391 bool succeeded, |
| 391 int32_t bytes_written); | 392 int32_t bytes_written); |
| 392 void OnUDPSocketRecvFromACK(uint32 plugin_dispatcher_id, | 393 void OnUDPSocketRecvFromACK(uint32 plugin_dispatcher_id, |
| 393 uint32 socket_id, | 394 uint32 socket_id, |
| 394 bool succeeded, | 395 bool succeeded, |
| 395 const std::string& data, | 396 const std::string& data, |
| 396 const PP_NetAddress_Private& addr); | 397 const PP_NetAddress_Private& addr); |
| 397 void OnTCPServerSocketListenACK(uint32 plugin_dispatcher_id, | 398 void OnTCPServerSocketListenACK(uint32 plugin_dispatcher_id, |
| 398 uint32 real_socket_id, | 399 PP_Resource socket_resource, |
| 399 uint32 temp_socket_id, | 400 uint32 socket_id, |
| 400 int32_t status); | 401 int32_t status); |
| 401 void OnTCPServerSocketAcceptACK(uint32 plugin_dispatcher_id, | 402 void OnTCPServerSocketAcceptACK(uint32 plugin_dispatcher_id, |
| 402 uint32 real_server_socket_id, | 403 uint32 socket_id, |
| 403 uint32 accepted_socket_id, | 404 uint32 accepted_socket_id, |
| 404 const PP_NetAddress_Private& local_addr, | 405 const PP_NetAddress_Private& local_addr, |
| 405 const PP_NetAddress_Private& remote_addr); | 406 const PP_NetAddress_Private& remote_addr); |
| 406 void OnHostResolverResolveACK(uint32 plugin_dispatcher_id, | 407 void OnHostResolverResolveACK(uint32 plugin_dispatcher_id, |
| 407 uint32 host_resolver_id, | 408 uint32 host_resolver_id, |
| 408 bool succeeded, | 409 bool succeeded, |
| 409 const std::string& canonical_name, | 410 const std::string& canonical_name, |
| 410 const ppapi::NetAddressList& net_address_list); | 411 const ppapi::NetAddressList& net_address_list); |
| 411 | 412 |
| 412 CONTENT_EXPORT int GetRoutingID() const; | 413 CONTENT_EXPORT int GetRoutingID() const; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 | 454 |
| 454 IDMap<AsyncOpenFileCallback> pending_async_open_files_; | 455 IDMap<AsyncOpenFileCallback> pending_async_open_files_; |
| 455 | 456 |
| 456 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_NetConnector_Impl>, | 457 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_NetConnector_Impl>, |
| 457 IDMapOwnPointer> pending_connect_tcps_; | 458 IDMapOwnPointer> pending_connect_tcps_; |
| 458 | 459 |
| 459 IDMap<webkit::ppapi::PPB_TCPSocket_Private_Impl> tcp_sockets_; | 460 IDMap<webkit::ppapi::PPB_TCPSocket_Private_Impl> tcp_sockets_; |
| 460 | 461 |
| 461 IDMap<webkit::ppapi::PPB_UDPSocket_Private_Impl> udp_sockets_; | 462 IDMap<webkit::ppapi::PPB_UDPSocket_Private_Impl> udp_sockets_; |
| 462 | 463 |
| 463 IDMap<webkit::ppapi::PPB_TCPServerSocket_Private_Impl> tcp_server_sockets_; | 464 IDMap<ppapi::PPB_TCPServerSocket_Shared> tcp_server_sockets_; |
| 464 | |
| 465 IDMap<webkit::ppapi::PPB_TCPServerSocket_Private_Impl> | |
| 466 uninitialized_tcp_server_sockets_; | |
| 467 | 465 |
| 468 IDMap<ppapi::PPB_HostResolver_Shared> host_resolvers_; | 466 IDMap<ppapi::PPB_HostResolver_Shared> host_resolvers_; |
| 469 | 467 |
| 470 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_Menu_Impl>, | 468 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_Menu_Impl>, |
| 471 IDMapOwnPointer> pending_context_menus_; | 469 IDMapOwnPointer> pending_context_menus_; |
| 472 | 470 |
| 473 typedef IDMap<scoped_refptr<PepperBrokerImpl>, IDMapOwnPointer> BrokerMap; | 471 typedef IDMap<scoped_refptr<PepperBrokerImpl>, IDMapOwnPointer> BrokerMap; |
| 474 BrokerMap pending_connect_broker_; | 472 BrokerMap pending_connect_broker_; |
| 475 | 473 |
| 476 // Whether or not the focus is on a PPAPI plugin | 474 // Whether or not the focus is on a PPAPI plugin |
| (...skipping 11 matching lines...) Expand all Loading... |
| 488 | 486 |
| 489 scoped_ptr<content::GamepadSharedMemoryReader> gamepad_shared_memory_reader_; | 487 scoped_ptr<content::GamepadSharedMemoryReader> gamepad_shared_memory_reader_; |
| 490 | 488 |
| 491 scoped_ptr<PepperDeviceEnumerationEventHandler> | 489 scoped_ptr<PepperDeviceEnumerationEventHandler> |
| 492 device_enumeration_event_handler_; | 490 device_enumeration_event_handler_; |
| 493 | 491 |
| 494 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); | 492 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); |
| 495 }; | 493 }; |
| 496 | 494 |
| 497 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 495 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
| OLD | NEW |