| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 #include "ppapi/proxy/ppapi_messages.h" | 67 #include "ppapi/proxy/ppapi_messages.h" |
| 68 #include "ppapi/shared_impl/file_path.h" | 68 #include "ppapi/shared_impl/file_path.h" |
| 69 #include "ppapi/shared_impl/platform_file.h" | 69 #include "ppapi/shared_impl/platform_file.h" |
| 70 #include "ppapi/shared_impl/ppapi_permissions.h" | 70 #include "ppapi/shared_impl/ppapi_permissions.h" |
| 71 #include "ppapi/shared_impl/ppapi_preferences.h" | 71 #include "ppapi/shared_impl/ppapi_preferences.h" |
| 72 #include "ppapi/shared_impl/ppb_device_ref_shared.h" | 72 #include "ppapi/shared_impl/ppb_device_ref_shared.h" |
| 73 #include "ppapi/thunk/enter.h" | 73 #include "ppapi/thunk/enter.h" |
| 74 #include "ppapi/thunk/ppb_tcp_server_socket_private_api.h" | 74 #include "ppapi/thunk/ppb_tcp_server_socket_private_api.h" |
| 75 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" | 75 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" |
| 76 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" | 76 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
| 77 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" |
| 77 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 78 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
| 78 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 79 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
| 79 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h" | 80 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h" |
| 80 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" | 81 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" |
| 81 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 82 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| 82 #include "ui/gfx/size.h" | 83 #include "ui/gfx/size.h" |
| 83 #include "webkit/fileapi/file_system_callback_dispatcher.h" | 84 #include "webkit/fileapi/file_system_callback_dispatcher.h" |
| 84 #include "webkit/plugins/npapi/webplugin.h" | 85 #include "webkit/plugins/npapi/webplugin.h" |
| 85 #include "webkit/plugins/ppapi/plugin_module.h" | 86 #include "webkit/plugins/ppapi/plugin_module.h" |
| 86 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 87 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 ppapi::proxy::HostDispatcher::SetForInstance(instance, dispatcher_.get()); | 155 ppapi::proxy::HostDispatcher::SetForInstance(instance, dispatcher_.get()); |
| 155 | 156 |
| 156 RendererPpapiHostImpl* host = | 157 RendererPpapiHostImpl* host = |
| 157 RendererPpapiHostImpl::GetForPPInstance(instance); | 158 RendererPpapiHostImpl::GetForPPInstance(instance); |
| 158 // TODO(brettw) remove this null check when the old-style pepper-based | 159 // TODO(brettw) remove this null check when the old-style pepper-based |
| 159 // browser tag is removed from this file. Getting this notification should | 160 // browser tag is removed from this file. Getting this notification should |
| 160 // always give us an instance we can find in the map otherwise, but that | 161 // always give us an instance we can find in the map otherwise, but that |
| 161 // isn't true for browser tag support. | 162 // isn't true for browser tag support. |
| 162 if (host) { | 163 if (host) { |
| 163 RenderView* render_view = host->GetRenderViewForInstance(instance); | 164 RenderView* render_view = host->GetRenderViewForInstance(instance); |
| 165 webkit::ppapi::PluginInstance* plugin_instance = |
| 166 host->GetPluginInstance(instance); |
| 164 render_view->Send(new ViewHostMsg_DidCreateOutOfProcessPepperInstance( | 167 render_view->Send(new ViewHostMsg_DidCreateOutOfProcessPepperInstance( |
| 165 plugin_child_id_, | 168 plugin_child_id_, |
| 166 instance, | 169 instance, |
| 167 render_view->GetRoutingID(), | 170 PepperRendererInstanceData( |
| 171 0, // The render process id will be supplied in the browser. |
| 172 render_view->GetRoutingID(), |
| 173 plugin_instance->container()->element().document().url(), |
| 174 plugin_instance->plugin_url()), |
| 168 is_external_)); | 175 is_external_)); |
| 169 } | 176 } |
| 170 } | 177 } |
| 171 virtual void RemoveInstance(PP_Instance instance) { | 178 virtual void RemoveInstance(PP_Instance instance) { |
| 172 ppapi::proxy::HostDispatcher::RemoveForInstance(instance); | 179 ppapi::proxy::HostDispatcher::RemoveForInstance(instance); |
| 173 | 180 |
| 174 RendererPpapiHostImpl* host = | 181 RendererPpapiHostImpl* host = |
| 175 RendererPpapiHostImpl::GetForPPInstance(instance); | 182 RendererPpapiHostImpl::GetForPPInstance(instance); |
| 176 // TODO(brettw) remove null check as described in AddInstance. | 183 // TODO(brettw) remove null check as described in AddInstance. |
| 177 if (host) { | 184 if (host) { |
| (...skipping 1622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1800 RenderWidgetFullscreenPepper* container = | 1807 RenderWidgetFullscreenPepper* container = |
| 1801 static_cast<RenderWidgetFullscreenPepper*>( | 1808 static_cast<RenderWidgetFullscreenPepper*>( |
| 1802 instance->fullscreen_container()); | 1809 instance->fullscreen_container()); |
| 1803 return container->mouse_lock_dispatcher(); | 1810 return container->mouse_lock_dispatcher(); |
| 1804 } else { | 1811 } else { |
| 1805 return render_view_->mouse_lock_dispatcher(); | 1812 return render_view_->mouse_lock_dispatcher(); |
| 1806 } | 1813 } |
| 1807 } | 1814 } |
| 1808 | 1815 |
| 1809 } // namespace content | 1816 } // namespace content |
| OLD | NEW |