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