| 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 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 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/public/renderer/render_view_observer.h" | 19 #include "content/public/renderer/render_view_observer.h" |
| 20 #include "content/renderer/mouse_lock_dispatcher.h" | 20 #include "content/renderer/mouse_lock_dispatcher.h" |
| 21 #include "content/renderer/pepper/pepper_parent_context_provider.h" | 21 #include "content/renderer/pepper/pepper_parent_context_provider.h" |
| 22 #include "content/renderer/render_view_pepper_helper.h" | 22 #include "content/renderer/render_view_pepper_helper.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/ppb_tcp_server_socket_shared.h" |
| 25 #include "ppapi/shared_impl/private/tcp_socket_private_impl.h" | 25 #include "ppapi/shared_impl/private/tcp_socket_private_impl.h" |
| 26 #include "ppapi/shared_impl/private/udp_socket_private_impl.h" | |
| 27 #include "ui/base/ime/text_input_type.h" | 26 #include "ui/base/ime/text_input_type.h" |
| 28 #include "webkit/plugins/ppapi/plugin_delegate.h" | 27 #include "webkit/plugins/ppapi/plugin_delegate.h" |
| 29 | 28 |
| 30 class FilePath; | 29 class FilePath; |
| 31 | 30 |
| 32 namespace IPC { | 31 namespace IPC { |
| 33 struct ChannelHandle; | 32 struct ChannelHandle; |
| 34 } | 33 } |
| 35 | 34 |
| 36 namespace ppapi { | 35 namespace ppapi { |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 uint16_t server_port, | 260 uint16_t server_port, |
| 262 const std::vector<std::vector<char> >& trusted_certs, | 261 const std::vector<std::vector<char> >& trusted_certs, |
| 263 const std::vector<std::vector<char> >& untrusted_certs) OVERRIDE; | 262 const std::vector<std::vector<char> >& untrusted_certs) OVERRIDE; |
| 264 virtual void TCPSocketRead(uint32 socket_id, int32_t bytes_to_read) OVERRIDE; | 263 virtual void TCPSocketRead(uint32 socket_id, int32_t bytes_to_read) OVERRIDE; |
| 265 virtual void TCPSocketWrite(uint32 socket_id, | 264 virtual void TCPSocketWrite(uint32 socket_id, |
| 266 const std::string& buffer) OVERRIDE; | 265 const std::string& buffer) OVERRIDE; |
| 267 virtual void TCPSocketDisconnect(uint32 socket_id) OVERRIDE; | 266 virtual void TCPSocketDisconnect(uint32 socket_id) OVERRIDE; |
| 268 virtual void RegisterTCPSocket( | 267 virtual void RegisterTCPSocket( |
| 269 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket, | 268 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket, |
| 270 uint32 socket_id) OVERRIDE; | 269 uint32 socket_id) OVERRIDE; |
| 271 virtual uint32 UDPSocketCreate() OVERRIDE; | |
| 272 virtual void UDPSocketSetBoolSocketFeature( | |
| 273 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket, | |
| 274 uint32 socket_id, | |
| 275 int32_t name, | |
| 276 bool value) OVERRIDE; | |
| 277 virtual void UDPSocketBind( | |
| 278 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket, | |
| 279 uint32 socket_id, | |
| 280 const PP_NetAddress_Private& addr) OVERRIDE; | |
| 281 virtual void UDPSocketRecvFrom(uint32 socket_id, | |
| 282 int32_t num_bytes) OVERRIDE; | |
| 283 virtual void UDPSocketSendTo(uint32 socket_id, | |
| 284 const std::string& buffer, | |
| 285 const PP_NetAddress_Private& addr) OVERRIDE; | |
| 286 virtual void UDPSocketClose(uint32 socket_id) OVERRIDE; | |
| 287 virtual void TCPServerSocketListen( | 270 virtual void TCPServerSocketListen( |
| 288 PP_Resource socket_resource, | 271 PP_Resource socket_resource, |
| 289 const PP_NetAddress_Private& addr, | 272 const PP_NetAddress_Private& addr, |
| 290 int32_t backlog) OVERRIDE; | 273 int32_t backlog) OVERRIDE; |
| 291 virtual void TCPServerSocketAccept(uint32 server_socket_id) OVERRIDE; | 274 virtual void TCPServerSocketAccept(uint32 server_socket_id) OVERRIDE; |
| 292 virtual void TCPServerSocketStopListening( | 275 virtual void TCPServerSocketStopListening( |
| 293 PP_Resource socket_resource, | 276 PP_Resource socket_resource, |
| 294 uint32 socket_id) OVERRIDE; | 277 uint32 socket_id) OVERRIDE; |
| 295 virtual void RegisterHostResolver( | 278 virtual void RegisterHostResolver( |
| 296 ppapi::PPB_HostResolver_Shared* host_resolver, | 279 ppapi::PPB_HostResolver_Shared* host_resolver, |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 bool succeeded, | 334 bool succeeded, |
| 352 const ppapi::PPB_X509Certificate_Fields& certificate_fields); | 335 const ppapi::PPB_X509Certificate_Fields& certificate_fields); |
| 353 void OnTCPSocketReadACK(uint32 plugin_dispatcher_id, | 336 void OnTCPSocketReadACK(uint32 plugin_dispatcher_id, |
| 354 uint32 socket_id, | 337 uint32 socket_id, |
| 355 bool succeeded, | 338 bool succeeded, |
| 356 const std::string& data); | 339 const std::string& data); |
| 357 void OnTCPSocketWriteACK(uint32 plugin_dispatcher_id, | 340 void OnTCPSocketWriteACK(uint32 plugin_dispatcher_id, |
| 358 uint32 socket_id, | 341 uint32 socket_id, |
| 359 bool succeeded, | 342 bool succeeded, |
| 360 int32_t bytes_written); | 343 int32_t bytes_written); |
| 361 void OnUDPSocketBindACK(uint32 plugin_dispatcher_id, | |
| 362 uint32 socket_id, | |
| 363 bool succeeded, | |
| 364 const PP_NetAddress_Private& addr); | |
| 365 void OnUDPSocketSendToACK(uint32 plugin_dispatcher_id, | |
| 366 uint32 socket_id, | |
| 367 bool succeeded, | |
| 368 int32_t bytes_written); | |
| 369 void OnUDPSocketRecvFromACK(uint32 plugin_dispatcher_id, | |
| 370 uint32 socket_id, | |
| 371 bool succeeded, | |
| 372 const std::string& data, | |
| 373 const PP_NetAddress_Private& addr); | |
| 374 void OnTCPServerSocketListenACK(uint32 plugin_dispatcher_id, | 344 void OnTCPServerSocketListenACK(uint32 plugin_dispatcher_id, |
| 375 PP_Resource socket_resource, | 345 PP_Resource socket_resource, |
| 376 uint32 socket_id, | 346 uint32 socket_id, |
| 377 int32_t status); | 347 int32_t status); |
| 378 void OnTCPServerSocketAcceptACK(uint32 plugin_dispatcher_id, | 348 void OnTCPServerSocketAcceptACK(uint32 plugin_dispatcher_id, |
| 379 uint32 socket_id, | 349 uint32 socket_id, |
| 380 uint32 accepted_socket_id, | 350 uint32 accepted_socket_id, |
| 381 const PP_NetAddress_Private& local_addr, | 351 const PP_NetAddress_Private& local_addr, |
| 382 const PP_NetAddress_Private& remote_addr); | 352 const PP_NetAddress_Private& remote_addr); |
| 383 void OnHostResolverResolveACK( | 353 void OnHostResolverResolveACK( |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 | 401 |
| 432 std::set<webkit::ppapi::PluginInstance*> active_instances_; | 402 std::set<webkit::ppapi::PluginInstance*> active_instances_; |
| 433 typedef std::map<webkit::ppapi::PluginInstance*, | 403 typedef std::map<webkit::ppapi::PluginInstance*, |
| 434 MouseLockDispatcher::LockTarget*> LockTargetMap; | 404 MouseLockDispatcher::LockTarget*> LockTargetMap; |
| 435 LockTargetMap mouse_lock_instances_; | 405 LockTargetMap mouse_lock_instances_; |
| 436 | 406 |
| 437 IDMap<AsyncOpenFileCallback> pending_async_open_files_; | 407 IDMap<AsyncOpenFileCallback> pending_async_open_files_; |
| 438 | 408 |
| 439 IDMap<webkit::ppapi::PPB_TCPSocket_Private_Impl> tcp_sockets_; | 409 IDMap<webkit::ppapi::PPB_TCPSocket_Private_Impl> tcp_sockets_; |
| 440 | 410 |
| 441 IDMap<webkit::ppapi::PPB_UDPSocket_Private_Impl> udp_sockets_; | |
| 442 | |
| 443 IDMap<ppapi::PPB_TCPServerSocket_Shared> tcp_server_sockets_; | 411 IDMap<ppapi::PPB_TCPServerSocket_Shared> tcp_server_sockets_; |
| 444 | 412 |
| 445 IDMap<ppapi::PPB_HostResolver_Shared> host_resolvers_; | 413 IDMap<ppapi::PPB_HostResolver_Shared> host_resolvers_; |
| 446 | 414 |
| 447 typedef IDMap<scoped_refptr<PepperBrokerImpl>, IDMapOwnPointer> BrokerMap; | 415 typedef IDMap<scoped_refptr<PepperBrokerImpl>, IDMapOwnPointer> BrokerMap; |
| 448 BrokerMap pending_connect_broker_; | 416 BrokerMap pending_connect_broker_; |
| 449 | 417 |
| 450 typedef IDMap<base::WeakPtr<webkit::ppapi::PPB_Broker_Impl> > | 418 typedef IDMap<base::WeakPtr<webkit::ppapi::PPB_Broker_Impl> > |
| 451 PermissionRequestMap; | 419 PermissionRequestMap; |
| 452 PermissionRequestMap pending_permission_requests_; | 420 PermissionRequestMap pending_permission_requests_; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 468 | 436 |
| 469 scoped_ptr<PepperDeviceEnumerationEventHandler> | 437 scoped_ptr<PepperDeviceEnumerationEventHandler> |
| 470 device_enumeration_event_handler_; | 438 device_enumeration_event_handler_; |
| 471 | 439 |
| 472 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); | 440 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); |
| 473 }; | 441 }; |
| 474 | 442 |
| 475 } // namespace content | 443 } // namespace content |
| 476 | 444 |
| 477 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 445 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
| OLD | NEW |