| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 #include "content/child/v8_value_converter_impl.h" | 46 #include "content/child/v8_value_converter_impl.h" |
| 47 #include "content/child/web_url_loader_impl.h" | 47 #include "content/child/web_url_loader_impl.h" |
| 48 #include "content/child/web_url_request_util.h" | 48 #include "content/child/web_url_request_util.h" |
| 49 #include "content/child/webmessageportchannel_impl.h" | 49 #include "content/child/webmessageportchannel_impl.h" |
| 50 #include "content/child/weburlresponse_extradata_impl.h" | 50 #include "content/child/weburlresponse_extradata_impl.h" |
| 51 #include "content/common/accessibility_messages.h" | 51 #include "content/common/accessibility_messages.h" |
| 52 #include "content/common/associated_interface_provider_impl.h" | 52 #include "content/common/associated_interface_provider_impl.h" |
| 53 #include "content/common/associated_interfaces.mojom.h" | 53 #include "content/common/associated_interfaces.mojom.h" |
| 54 #include "content/common/clipboard_messages.h" | 54 #include "content/common/clipboard_messages.h" |
| 55 #include "content/common/content_constants_internal.h" | 55 #include "content/common/content_constants_internal.h" |
| 56 #include "content/common/content_security_policy/csp_context.h" |
| 56 #include "content/common/content_security_policy_header.h" | 57 #include "content/common/content_security_policy_header.h" |
| 57 #include "content/common/download/mhtml_save_status.h" | 58 #include "content/common/download/mhtml_save_status.h" |
| 58 #include "content/common/edit_command.h" | 59 #include "content/common/edit_command.h" |
| 59 #include "content/common/frame_messages.h" | 60 #include "content/common/frame_messages.h" |
| 60 #include "content/common/frame_owner_properties.h" | 61 #include "content/common/frame_owner_properties.h" |
| 61 #include "content/common/frame_replication_state.h" | 62 #include "content/common/frame_replication_state.h" |
| 62 #include "content/common/input_messages.h" | 63 #include "content/common/input_messages.h" |
| 63 #include "content/common/navigation_params.h" | 64 #include "content/common/navigation_params.h" |
| 64 #include "content/common/page_messages.h" | 65 #include "content/common/page_messages.h" |
| 65 #include "content/common/savable_subframe.h" | 66 #include "content/common/savable_subframe.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 88 #include "content/public/renderer/content_renderer_client.h" | 89 #include "content/public/renderer/content_renderer_client.h" |
| 89 #include "content/public/renderer/context_menu_client.h" | 90 #include "content/public/renderer/context_menu_client.h" |
| 90 #include "content/public/renderer/document_state.h" | 91 #include "content/public/renderer/document_state.h" |
| 91 #include "content/public/renderer/navigation_state.h" | 92 #include "content/public/renderer/navigation_state.h" |
| 92 #include "content/public/renderer/render_frame_observer.h" | 93 #include "content/public/renderer/render_frame_observer.h" |
| 93 #include "content/public/renderer/renderer_ppapi_host.h" | 94 #include "content/public/renderer/renderer_ppapi_host.h" |
| 94 #include "content/renderer/accessibility/render_accessibility_impl.h" | 95 #include "content/renderer/accessibility/render_accessibility_impl.h" |
| 95 #include "content/renderer/browser_plugin/browser_plugin.h" | 96 #include "content/renderer/browser_plugin/browser_plugin.h" |
| 96 #include "content/renderer/browser_plugin/browser_plugin_manager.h" | 97 #include "content/renderer/browser_plugin/browser_plugin_manager.h" |
| 97 #include "content/renderer/child_frame_compositing_helper.h" | 98 #include "content/renderer/child_frame_compositing_helper.h" |
| 99 #include "content/renderer/content_security_policy_util.h" |
| 98 #include "content/renderer/context_menu_params_builder.h" | 100 #include "content/renderer/context_menu_params_builder.h" |
| 99 #include "content/renderer/devtools/devtools_agent.h" | 101 #include "content/renderer/devtools/devtools_agent.h" |
| 100 #include "content/renderer/dom_automation_controller.h" | 102 #include "content/renderer/dom_automation_controller.h" |
| 101 #include "content/renderer/effective_connection_type_helper.h" | 103 #include "content/renderer/effective_connection_type_helper.h" |
| 102 #include "content/renderer/external_popup_menu.h" | 104 #include "content/renderer/external_popup_menu.h" |
| 103 #include "content/renderer/frame_owner_properties.h" | 105 #include "content/renderer/frame_owner_properties.h" |
| 104 #include "content/renderer/gpu/gpu_benchmarking_extension.h" | 106 #include "content/renderer/gpu/gpu_benchmarking_extension.h" |
| 105 #include "content/renderer/history_entry.h" | 107 #include "content/renderer/history_entry.h" |
| 106 #include "content/renderer/history_serialization.h" | 108 #include "content/renderer/history_serialization.h" |
| 107 #include "content/renderer/image_downloader/image_downloader_impl.h" | 109 #include "content/renderer/image_downloader/image_downloader_impl.h" |
| (...skipping 3100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3208 | 3210 |
| 3209 void RenderFrameImpl::didSetFeaturePolicyHeader( | 3211 void RenderFrameImpl::didSetFeaturePolicyHeader( |
| 3210 const blink::WebParsedFeaturePolicyHeader& parsed_header) { | 3212 const blink::WebParsedFeaturePolicyHeader& parsed_header) { |
| 3211 Send(new FrameHostMsg_DidSetFeaturePolicyHeader( | 3213 Send(new FrameHostMsg_DidSetFeaturePolicyHeader( |
| 3212 routing_id_, FeaturePolicyHeaderFromWeb(parsed_header))); | 3214 routing_id_, FeaturePolicyHeaderFromWeb(parsed_header))); |
| 3213 } | 3215 } |
| 3214 | 3216 |
| 3215 void RenderFrameImpl::didAddContentSecurityPolicy( | 3217 void RenderFrameImpl::didAddContentSecurityPolicy( |
| 3216 const blink::WebString& header_value, | 3218 const blink::WebString& header_value, |
| 3217 blink::WebContentSecurityPolicyType type, | 3219 blink::WebContentSecurityPolicyType type, |
| 3218 blink::WebContentSecurityPolicySource source) { | 3220 blink::WebContentSecurityPolicySource source, |
| 3219 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) | 3221 const std::vector<blink::WebContentSecurityPolicyPolicy>& policies) { |
| 3220 return; | |
| 3221 | |
| 3222 ContentSecurityPolicyHeader header; | 3222 ContentSecurityPolicyHeader header; |
| 3223 header.header_value = header_value.utf8(); | 3223 header.header_value = header_value.utf8(); |
| 3224 header.type = type; | 3224 header.type = type; |
| 3225 header.source = source; | 3225 header.source = source; |
| 3226 Send(new FrameHostMsg_DidAddContentSecurityPolicy(routing_id_, header)); | 3226 |
| 3227 std::vector<ContentSecurityPolicy> content_policies; |
| 3228 for (const auto& policy : policies) |
| 3229 content_policies.push_back(BuildContentSecurityPolicy(policy)); |
| 3230 |
| 3231 Send(new FrameHostMsg_DidAddContentSecurityPolicy(routing_id_, header, |
| 3232 content_policies)); |
| 3227 } | 3233 } |
| 3228 | 3234 |
| 3229 void RenderFrameImpl::didChangeFrameOwnerProperties( | 3235 void RenderFrameImpl::didChangeFrameOwnerProperties( |
| 3230 blink::WebFrame* child_frame, | 3236 blink::WebFrame* child_frame, |
| 3231 const blink::WebFrameOwnerProperties& frame_owner_properties) { | 3237 const blink::WebFrameOwnerProperties& frame_owner_properties) { |
| 3232 Send(new FrameHostMsg_DidChangeFrameOwnerProperties( | 3238 Send(new FrameHostMsg_DidChangeFrameOwnerProperties( |
| 3233 routing_id_, GetRoutingIdForFrameOrProxy(child_frame), | 3239 routing_id_, GetRoutingIdForFrameOrProxy(child_frame), |
| 3234 ConvertWebFrameOwnerPropertiesToFrameOwnerProperties( | 3240 ConvertWebFrameOwnerPropertiesToFrameOwnerProperties( |
| 3235 frame_owner_properties))); | 3241 frame_owner_properties))); |
| 3236 } | 3242 } |
| (...skipping 3626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6863 // event target. Potentially a Pepper plugin will receive the event. | 6869 // event target. Potentially a Pepper plugin will receive the event. |
| 6864 // In order to tell whether a plugin gets the last mouse event and which it | 6870 // In order to tell whether a plugin gets the last mouse event and which it |
| 6865 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6871 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6866 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6872 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6867 // |pepper_last_mouse_event_target_|. | 6873 // |pepper_last_mouse_event_target_|. |
| 6868 pepper_last_mouse_event_target_ = nullptr; | 6874 pepper_last_mouse_event_target_ = nullptr; |
| 6869 #endif | 6875 #endif |
| 6870 } | 6876 } |
| 6871 | 6877 |
| 6872 } // namespace content | 6878 } // namespace content |
| OLD | NEW |