| 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" | |
| 24 #include "ppapi/shared_impl/private/ppb_tcp_server_socket_shared.h" | 23 #include "ppapi/shared_impl/private/ppb_tcp_server_socket_shared.h" |
| 25 #include "ppapi/shared_impl/private/tcp_socket_private_impl.h" | 24 #include "ppapi/shared_impl/private/tcp_socket_private_impl.h" |
| 26 #include "ui/base/ime/text_input_type.h" | 25 #include "ui/base/ime/text_input_type.h" |
| 27 #include "webkit/plugins/ppapi/plugin_delegate.h" | 26 #include "webkit/plugins/ppapi/plugin_delegate.h" |
| 28 | 27 |
| 29 class FilePath; | 28 class FilePath; |
| 30 | 29 |
| 31 namespace IPC { | 30 namespace IPC { |
| 32 struct ChannelHandle; | 31 struct ChannelHandle; |
| 33 } | 32 } |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket, | 269 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket, |
| 271 uint32 socket_id) OVERRIDE; | 270 uint32 socket_id) OVERRIDE; |
| 272 virtual void TCPServerSocketListen( | 271 virtual void TCPServerSocketListen( |
| 273 PP_Resource socket_resource, | 272 PP_Resource socket_resource, |
| 274 const PP_NetAddress_Private& addr, | 273 const PP_NetAddress_Private& addr, |
| 275 int32_t backlog) OVERRIDE; | 274 int32_t backlog) OVERRIDE; |
| 276 virtual void TCPServerSocketAccept(uint32 server_socket_id) OVERRIDE; | 275 virtual void TCPServerSocketAccept(uint32 server_socket_id) OVERRIDE; |
| 277 virtual void TCPServerSocketStopListening( | 276 virtual void TCPServerSocketStopListening( |
| 278 PP_Resource socket_resource, | 277 PP_Resource socket_resource, |
| 279 uint32 socket_id) OVERRIDE; | 278 uint32 socket_id) OVERRIDE; |
| 280 virtual void RegisterHostResolver( | |
| 281 ppapi::PPB_HostResolver_Shared* host_resolver, | |
| 282 uint32 host_resolver_id) OVERRIDE; | |
| 283 virtual void HostResolverResolve( | |
| 284 uint32 host_resolver_id, | |
| 285 const ::ppapi::HostPortPair& host_port, | |
| 286 const PP_HostResolver_Private_Hint* hint) OVERRIDE; | |
| 287 virtual void UnregisterHostResolver(uint32 host_resolver_id) OVERRIDE; | |
| 288 virtual bool AddNetworkListObserver( | 279 virtual bool AddNetworkListObserver( |
| 289 webkit_glue::NetworkListObserver* observer) OVERRIDE; | 280 webkit_glue::NetworkListObserver* observer) OVERRIDE; |
| 290 virtual void RemoveNetworkListObserver( | 281 virtual void RemoveNetworkListObserver( |
| 291 webkit_glue::NetworkListObserver* observer) OVERRIDE; | 282 webkit_glue::NetworkListObserver* observer) OVERRIDE; |
| 292 virtual bool X509CertificateParseDER( | 283 virtual bool X509CertificateParseDER( |
| 293 const std::vector<char>& der, | 284 const std::vector<char>& der, |
| 294 ppapi::PPB_X509Certificate_Fields* fields) OVERRIDE; | 285 ppapi::PPB_X509Certificate_Fields* fields) OVERRIDE; |
| 295 virtual webkit::ppapi::FullscreenContainer* | 286 virtual webkit::ppapi::FullscreenContainer* |
| 296 CreateFullscreenContainer( | 287 CreateFullscreenContainer( |
| 297 webkit::ppapi::PluginInstance* instance) OVERRIDE; | 288 webkit::ppapi::PluginInstance* instance) OVERRIDE; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 int32_t bytes_written); | 336 int32_t bytes_written); |
| 346 void OnTCPServerSocketListenACK(uint32 plugin_dispatcher_id, | 337 void OnTCPServerSocketListenACK(uint32 plugin_dispatcher_id, |
| 347 PP_Resource socket_resource, | 338 PP_Resource socket_resource, |
| 348 uint32 socket_id, | 339 uint32 socket_id, |
| 349 int32_t status); | 340 int32_t status); |
| 350 void OnTCPServerSocketAcceptACK(uint32 plugin_dispatcher_id, | 341 void OnTCPServerSocketAcceptACK(uint32 plugin_dispatcher_id, |
| 351 uint32 socket_id, | 342 uint32 socket_id, |
| 352 uint32 accepted_socket_id, | 343 uint32 accepted_socket_id, |
| 353 const PP_NetAddress_Private& local_addr, | 344 const PP_NetAddress_Private& local_addr, |
| 354 const PP_NetAddress_Private& remote_addr); | 345 const PP_NetAddress_Private& remote_addr); |
| 355 void OnHostResolverResolveACK( | |
| 356 uint32 plugin_dispatcher_id, | |
| 357 uint32 host_resolver_id, | |
| 358 bool succeeded, | |
| 359 const std::string& canonical_name, | |
| 360 const std::vector<PP_NetAddress_Private>& net_address_list); | |
| 361 | 346 |
| 362 // Attempts to create a PPAPI plugin for the given filepath. On success, it | 347 // Attempts to create a PPAPI plugin for the given filepath. On success, it |
| 363 // will return the newly-created module. | 348 // will return the newly-created module. |
| 364 // | 349 // |
| 365 // There are two reasons for failure. The first is that the plugin isn't | 350 // There are two reasons for failure. The first is that the plugin isn't |
| 366 // a PPAPI plugin. In this case, |*pepper_plugin_was_registered| will be set | 351 // a PPAPI plugin. In this case, |*pepper_plugin_was_registered| will be set |
| 367 // to false and the caller may want to fall back on creating an NPAPI plugin. | 352 // to false and the caller may want to fall back on creating an NPAPI plugin. |
| 368 // the second is that the plugin failed to initialize. In this case, | 353 // the second is that the plugin failed to initialize. In this case, |
| 369 // |*pepper_plugin_was_registered| will be set to true and the caller should | 354 // |*pepper_plugin_was_registered| will be set to true and the caller should |
| 370 // not fall back on any other plugin types. | 355 // not fall back on any other plugin types. |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 typedef std::map<webkit::ppapi::PluginInstance*, | 391 typedef std::map<webkit::ppapi::PluginInstance*, |
| 407 MouseLockDispatcher::LockTarget*> LockTargetMap; | 392 MouseLockDispatcher::LockTarget*> LockTargetMap; |
| 408 LockTargetMap mouse_lock_instances_; | 393 LockTargetMap mouse_lock_instances_; |
| 409 | 394 |
| 410 IDMap<AsyncOpenFileCallback> pending_async_open_files_; | 395 IDMap<AsyncOpenFileCallback> pending_async_open_files_; |
| 411 | 396 |
| 412 IDMap<webkit::ppapi::PPB_TCPSocket_Private_Impl> tcp_sockets_; | 397 IDMap<webkit::ppapi::PPB_TCPSocket_Private_Impl> tcp_sockets_; |
| 413 | 398 |
| 414 IDMap<ppapi::PPB_TCPServerSocket_Shared> tcp_server_sockets_; | 399 IDMap<ppapi::PPB_TCPServerSocket_Shared> tcp_server_sockets_; |
| 415 | 400 |
| 416 IDMap<ppapi::PPB_HostResolver_Shared> host_resolvers_; | |
| 417 | |
| 418 typedef IDMap<scoped_refptr<PepperBrokerImpl>, IDMapOwnPointer> BrokerMap; | 401 typedef IDMap<scoped_refptr<PepperBrokerImpl>, IDMapOwnPointer> BrokerMap; |
| 419 BrokerMap pending_connect_broker_; | 402 BrokerMap pending_connect_broker_; |
| 420 | 403 |
| 421 typedef IDMap<base::WeakPtr<webkit::ppapi::PPB_Broker_Impl> > | 404 typedef IDMap<base::WeakPtr<webkit::ppapi::PPB_Broker_Impl> > |
| 422 PermissionRequestMap; | 405 PermissionRequestMap; |
| 423 PermissionRequestMap pending_permission_requests_; | 406 PermissionRequestMap pending_permission_requests_; |
| 424 | 407 |
| 425 // Whether or not the focus is on a PPAPI plugin | 408 // Whether or not the focus is on a PPAPI plugin |
| 426 webkit::ppapi::PluginInstance* focused_plugin_; | 409 webkit::ppapi::PluginInstance* focused_plugin_; |
| 427 | 410 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 439 | 422 |
| 440 scoped_ptr<PepperDeviceEnumerationEventHandler> | 423 scoped_ptr<PepperDeviceEnumerationEventHandler> |
| 441 device_enumeration_event_handler_; | 424 device_enumeration_event_handler_; |
| 442 | 425 |
| 443 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); | 426 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); |
| 444 }; | 427 }; |
| 445 | 428 |
| 446 } // namespace content | 429 } // namespace content |
| 447 | 430 |
| 448 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 431 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
| OLD | NEW |