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 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h" | 5 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <cstddef> | 8 #include <cstddef> |
9 #include <map> | 9 #include <map> |
10 #include <queue> | 10 #include <queue> |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 #include "content/renderer/pepper/pepper_hung_plugin_filter.h" | 50 #include "content/renderer/pepper/pepper_hung_plugin_filter.h" |
51 #include "content/renderer/pepper/pepper_in_process_resource_creation.h" | 51 #include "content/renderer/pepper/pepper_in_process_resource_creation.h" |
52 #include "content/renderer/pepper/pepper_in_process_router.h" | 52 #include "content/renderer/pepper/pepper_in_process_router.h" |
53 #include "content/renderer/pepper/pepper_platform_audio_input_impl.h" | 53 #include "content/renderer/pepper/pepper_platform_audio_input_impl.h" |
54 #include "content/renderer/pepper/pepper_platform_audio_output_impl.h" | 54 #include "content/renderer/pepper/pepper_platform_audio_output_impl.h" |
55 #include "content/renderer/pepper/pepper_platform_context_3d_impl.h" | 55 #include "content/renderer/pepper/pepper_platform_context_3d_impl.h" |
56 #include "content/renderer/pepper/pepper_platform_image_2d_impl.h" | 56 #include "content/renderer/pepper/pepper_platform_image_2d_impl.h" |
57 #include "content/renderer/pepper/pepper_platform_video_capture_impl.h" | 57 #include "content/renderer/pepper/pepper_platform_video_capture_impl.h" |
58 #include "content/renderer/pepper/pepper_proxy_channel_delegate_impl.h" | 58 #include "content/renderer/pepper/pepper_proxy_channel_delegate_impl.h" |
59 #include "content/renderer/pepper/pepper_url_loader_host.h" | 59 #include "content/renderer/pepper/pepper_url_loader_host.h" |
| 60 #include "content/renderer/pepper/plugin_module.h" |
| 61 #include "content/renderer/pepper/ppapi_plugin_instance_impl.h" |
| 62 #include "content/renderer/pepper/ppapi_webplugin_impl.h" |
| 63 #include "content/renderer/pepper/ppb_tcp_server_socket_private_impl.h" |
| 64 #include "content/renderer/pepper/ppb_tcp_socket_private_impl.h" |
60 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" | 65 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" |
| 66 #include "content/renderer/pepper/resource_helper.h" |
61 #include "content/renderer/pepper/url_response_info_util.h" | 67 #include "content/renderer/pepper/url_response_info_util.h" |
62 #include "content/renderer/render_thread_impl.h" | 68 #include "content/renderer/render_thread_impl.h" |
63 #include "content/renderer/render_view_impl.h" | 69 #include "content/renderer/render_view_impl.h" |
64 #include "content/renderer/render_widget_fullscreen_pepper.h" | 70 #include "content/renderer/render_widget_fullscreen_pepper.h" |
65 #include "content/renderer/webplugin_delegate_proxy.h" | 71 #include "content/renderer/webplugin_delegate_proxy.h" |
66 #include "ipc/ipc_channel_handle.h" | 72 #include "ipc/ipc_channel_handle.h" |
67 #include "media/base/audio_hardware_config.h" | 73 #include "media/base/audio_hardware_config.h" |
68 #include "media/video/capture/video_capture_proxy.h" | 74 #include "media/video/capture/video_capture_proxy.h" |
69 #include "ppapi/c/dev/pp_video_dev.h" | 75 #include "ppapi/c/dev/pp_video_dev.h" |
70 #include "ppapi/c/pp_errors.h" | 76 #include "ppapi/c/pp_errors.h" |
(...skipping 17 matching lines...) Expand all Loading... |
88 #include "third_party/WebKit/public/web/WebCursorInfo.h" | 94 #include "third_party/WebKit/public/web/WebCursorInfo.h" |
89 #include "third_party/WebKit/public/web/WebDocument.h" | 95 #include "third_party/WebKit/public/web/WebDocument.h" |
90 #include "third_party/WebKit/public/web/WebElement.h" | 96 #include "third_party/WebKit/public/web/WebElement.h" |
91 #include "third_party/WebKit/public/web/WebFrame.h" | 97 #include "third_party/WebKit/public/web/WebFrame.h" |
92 #include "third_party/WebKit/public/web/WebInputEvent.h" | 98 #include "third_party/WebKit/public/web/WebInputEvent.h" |
93 #include "third_party/WebKit/public/web/WebPluginContainer.h" | 99 #include "third_party/WebKit/public/web/WebPluginContainer.h" |
94 #include "third_party/WebKit/public/web/WebScreenInfo.h" | 100 #include "third_party/WebKit/public/web/WebScreenInfo.h" |
95 #include "third_party/WebKit/public/web/WebView.h" | 101 #include "third_party/WebKit/public/web/WebView.h" |
96 #include "ui/gfx/size.h" | 102 #include "ui/gfx/size.h" |
97 #include "url/gurl.h" | 103 #include "url/gurl.h" |
98 #include "webkit/plugins/ppapi/plugin_module.h" | |
99 #include "webkit/plugins/ppapi/ppapi_plugin_instance_impl.h" | |
100 #include "webkit/plugins/ppapi/ppapi_webplugin_impl.h" | |
101 #include "webkit/plugins/ppapi/ppb_tcp_server_socket_private_impl.h" | |
102 #include "webkit/plugins/ppapi/ppb_tcp_socket_private_impl.h" | |
103 #include "webkit/plugins/ppapi/resource_helper.h" | |
104 | 104 |
105 using WebKit::WebView; | 105 using WebKit::WebView; |
106 using WebKit::WebFrame; | 106 using WebKit::WebFrame; |
107 | 107 |
108 namespace content { | 108 namespace content { |
109 | 109 |
110 namespace { | 110 namespace { |
111 | 111 |
112 // This class wraps a dispatcher and has the same lifetime. A dispatcher has | 112 // This class wraps a dispatcher and has the same lifetime. A dispatcher has |
113 // the same lifetime as a plugin module, which is longer than any particular | 113 // the same lifetime as a plugin module, which is longer than any particular |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 path, &channel_handle, &peer_pid, &plugin_child_id)); | 406 path, &channel_handle, &peer_pid, &plugin_child_id)); |
407 if (channel_handle.name.empty()) { | 407 if (channel_handle.name.empty()) { |
408 // Couldn't be initialized. | 408 // Couldn't be initialized. |
409 return scoped_refptr<webkit::ppapi::PluginModule>(); | 409 return scoped_refptr<webkit::ppapi::PluginModule>(); |
410 } | 410 } |
411 | 411 |
412 // AddLiveModule must be called before any early returns since the | 412 // AddLiveModule must be called before any early returns since the |
413 // module's destructor will remove itself. | 413 // module's destructor will remove itself. |
414 module = new webkit::ppapi::PluginModule( | 414 module = new webkit::ppapi::PluginModule( |
415 info->name, path, | 415 info->name, path, |
416 PepperPluginRegistry::GetInstance(), | |
417 permissions); | 416 permissions); |
418 PepperPluginRegistry::GetInstance()->AddLiveModule(path, module.get()); | 417 PepperPluginRegistry::GetInstance()->AddLiveModule(path, module.get()); |
419 | 418 |
420 if (!CreateOutOfProcessModule(module.get(), | 419 if (!CreateOutOfProcessModule(module.get(), |
421 path, | 420 path, |
422 permissions, | 421 permissions, |
423 channel_handle, | 422 channel_handle, |
424 peer_pid, | 423 peer_pid, |
425 plugin_child_id, | 424 plugin_child_id, |
426 false)) // is_external = false | 425 false)) // is_external = false |
(...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1692 should_close_source); | 1691 should_close_source); |
1693 } | 1692 } |
1694 | 1693 |
1695 bool PepperPluginDelegateImpl::IsRunningInProcess(PP_Instance instance) const { | 1694 bool PepperPluginDelegateImpl::IsRunningInProcess(PP_Instance instance) const { |
1696 RendererPpapiHostImpl* host = | 1695 RendererPpapiHostImpl* host = |
1697 RendererPpapiHostImpl::GetForPPInstance(instance); | 1696 RendererPpapiHostImpl::GetForPPInstance(instance); |
1698 return host && host->IsRunningInProcess(); | 1697 return host && host->IsRunningInProcess(); |
1699 } | 1698 } |
1700 | 1699 |
1701 } // namespace content | 1700 } // namespace content |
OLD | NEW |