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 14 matching lines...) Expand all Loading... |
25 #include "content/common/fileapi/file_system_messages.h" | 25 #include "content/common/fileapi/file_system_messages.h" |
26 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | 26 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" |
27 #include "content/common/pepper_file_messages.h" | 27 #include "content/common/pepper_file_messages.h" |
28 #include "content/common/pepper_plugin_registry.h" | 28 #include "content/common/pepper_plugin_registry.h" |
29 #include "content/common/pepper_messages.h" | 29 #include "content/common/pepper_messages.h" |
30 #include "content/common/quota_dispatcher.h" | 30 #include "content/common/quota_dispatcher.h" |
31 #include "content/common/view_messages.h" | 31 #include "content/common/view_messages.h" |
32 #include "content/public/common/content_switches.h" | 32 #include "content/public/common/content_switches.h" |
33 #include "content/public/common/context_menu_params.h" | 33 #include "content/public/common/context_menu_params.h" |
34 #include "content/public/common/media_stream_request.h" | 34 #include "content/public/common/media_stream_request.h" |
| 35 #include "content/public/common/referrer.h" |
35 #include "content/public/renderer/content_renderer_client.h" | 36 #include "content/public/renderer/content_renderer_client.h" |
36 #include "content/renderer/gamepad_shared_memory_reader.h" | 37 #include "content/renderer/gamepad_shared_memory_reader.h" |
37 #include "content/renderer/media/audio_hardware.h" | 38 #include "content/renderer/media/audio_hardware.h" |
38 #include "content/renderer/media/media_stream_dispatcher.h" | 39 #include "content/renderer/media/media_stream_dispatcher.h" |
39 #include "content/renderer/media/pepper_platform_video_decoder_impl.h" | 40 #include "content/renderer/media/pepper_platform_video_decoder_impl.h" |
40 #include "content/renderer/p2p/p2p_transport_impl.h" | 41 #include "content/renderer/p2p/p2p_transport_impl.h" |
41 #include "content/renderer/p2p/socket_dispatcher.h" | 42 #include "content/renderer/p2p/socket_dispatcher.h" |
42 #include "content/renderer/pepper/pepper_broker_impl.h" | 43 #include "content/renderer/pepper/pepper_broker_impl.h" |
43 #include "content/renderer/pepper/pepper_device_enumeration_event_handler.h" | 44 #include "content/renderer/pepper/pepper_device_enumeration_event_handler.h" |
44 #include "content/renderer/pepper/pepper_hung_plugin_filter.h" | 45 #include "content/renderer/pepper/pepper_hung_plugin_filter.h" |
(...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1254 void PepperPluginDelegateImpl::DidStopLoading() { | 1255 void PepperPluginDelegateImpl::DidStopLoading() { |
1255 render_view_->DidStopLoadingForPlugin(); | 1256 render_view_->DidStopLoadingForPlugin(); |
1256 } | 1257 } |
1257 | 1258 |
1258 void PepperPluginDelegateImpl::SetContentRestriction(int restrictions) { | 1259 void PepperPluginDelegateImpl::SetContentRestriction(int restrictions) { |
1259 render_view_->Send(new ViewHostMsg_UpdateContentRestrictions( | 1260 render_view_->Send(new ViewHostMsg_UpdateContentRestrictions( |
1260 render_view_->routing_id(), restrictions)); | 1261 render_view_->routing_id(), restrictions)); |
1261 } | 1262 } |
1262 | 1263 |
1263 void PepperPluginDelegateImpl::SaveURLAs(const GURL& url) { | 1264 void PepperPluginDelegateImpl::SaveURLAs(const GURL& url) { |
| 1265 WebFrame* frame = render_view_->webview()->mainFrame(); |
| 1266 content::Referrer referrer(frame->document().url(), |
| 1267 frame->document().referrerPolicy()); |
1264 render_view_->Send(new ViewHostMsg_SaveURLAs( | 1268 render_view_->Send(new ViewHostMsg_SaveURLAs( |
1265 render_view_->routing_id(), url)); | 1269 render_view_->routing_id(), url, referrer)); |
1266 } | 1270 } |
1267 | 1271 |
1268 webkit_glue::P2PTransport* PepperPluginDelegateImpl::CreateP2PTransport() { | 1272 webkit_glue::P2PTransport* PepperPluginDelegateImpl::CreateP2PTransport() { |
1269 #if defined(ENABLE_P2P_APIS) | 1273 #if defined(ENABLE_P2P_APIS) |
1270 return new P2PTransportImpl(render_view_->p2p_socket_dispatcher()); | 1274 return new P2PTransportImpl(render_view_->p2p_socket_dispatcher()); |
1271 #else | 1275 #else |
1272 return NULL; | 1276 return NULL; |
1273 #endif | 1277 #endif |
1274 } | 1278 } |
1275 | 1279 |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1628 mouse_lock_instances_.erase(it); | 1632 mouse_lock_instances_.erase(it); |
1629 } | 1633 } |
1630 } | 1634 } |
1631 | 1635 |
1632 webkit_glue::ClipboardClient* | 1636 webkit_glue::ClipboardClient* |
1633 PepperPluginDelegateImpl::CreateClipboardClient() const { | 1637 PepperPluginDelegateImpl::CreateClipboardClient() const { |
1634 return new RendererClipboardClient; | 1638 return new RendererClipboardClient; |
1635 } | 1639 } |
1636 | 1640 |
1637 } // namespace content | 1641 } // namespace content |
OLD | NEW |