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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
43 #include "content/child/service_worker/service_worker_provider_context.h" | 43 #include "content/child/service_worker/service_worker_provider_context.h" |
44 #include "content/child/service_worker/web_service_worker_provider_impl.h" | 44 #include "content/child/service_worker/web_service_worker_provider_impl.h" |
45 #include "content/child/v8_value_converter_impl.h" | 45 #include "content/child/v8_value_converter_impl.h" |
46 #include "content/child/web_url_loader_impl.h" | 46 #include "content/child/web_url_loader_impl.h" |
47 #include "content/child/web_url_request_util.h" | 47 #include "content/child/web_url_request_util.h" |
48 #include "content/child/webmessageportchannel_impl.h" | 48 #include "content/child/webmessageportchannel_impl.h" |
49 #include "content/child/websocket_bridge.h" | 49 #include "content/child/websocket_bridge.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/clipboard_messages.h" | 52 #include "content/common/clipboard_messages.h" |
53 #include "content/common/content_security_policy_header.h" | |
53 #include "content/common/frame_messages.h" | 54 #include "content/common/frame_messages.h" |
54 #include "content/common/frame_replication_state.h" | 55 #include "content/common/frame_replication_state.h" |
55 #include "content/common/gpu/client/context_provider_command_buffer.h" | 56 #include "content/common/gpu/client/context_provider_command_buffer.h" |
56 #include "content/common/input_messages.h" | 57 #include "content/common/input_messages.h" |
57 #include "content/common/navigation_params.h" | 58 #include "content/common/navigation_params.h" |
58 #include "content/common/page_messages.h" | 59 #include "content/common/page_messages.h" |
59 #include "content/common/savable_subframe.h" | 60 #include "content/common/savable_subframe.h" |
60 #include "content/common/service_worker/service_worker_types.h" | 61 #include "content/common/service_worker/service_worker_types.h" |
61 #include "content/common/site_isolation_policy.h" | 62 #include "content/common/site_isolation_policy.h" |
62 #include "content/common/ssl_status_serialization.h" | 63 #include "content/common/ssl_status_serialization.h" |
(...skipping 5944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6007 media::ConvertToOutputDeviceStatusCB(web_callbacks); | 6008 media::ConvertToOutputDeviceStatusCB(web_callbacks); |
6008 callback.Run(AudioDeviceFactory::GetOutputDeviceInfo( | 6009 callback.Run(AudioDeviceFactory::GetOutputDeviceInfo( |
6009 routing_id_, 0, sink_id.utf8(), security_origin) | 6010 routing_id_, 0, sink_id.utf8(), security_origin) |
6010 .device_status()); | 6011 .device_status()); |
6011 } | 6012 } |
6012 | 6013 |
6013 blink::ServiceRegistry* RenderFrameImpl::serviceRegistry() { | 6014 blink::ServiceRegistry* RenderFrameImpl::serviceRegistry() { |
6014 return &blink_service_registry_; | 6015 return &blink_service_registry_; |
6015 } | 6016 } |
6016 | 6017 |
6018 void RenderFrameImpl::didAddContentSecurityPolicy( | |
6019 const blink::WebString& header_value, | |
6020 blink::WebContentSecurityPolicyType type, | |
6021 blink::WebContentSecurityPolicySource source) { | |
6022 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) | |
alexmos
2016/05/12 22:37:24
I think this is ok. One thought is that this migh
Łukasz Anforowicz
2016/05/13 17:29:15
This reminds me - there are other places where we
| |
6023 return; | |
6024 | |
6025 ContentSecurityPolicyHeader header; | |
6026 header.header_value = base::UTF16ToUTF8(base::StringPiece16(header_value)); | |
6027 header.type = type; | |
6028 header.source = source; | |
6029 Send(new FrameHostMsg_DidAddContentSecurityPolicy(routing_id_, header)); | |
6030 } | |
6031 | |
6017 blink::WebPlugin* RenderFrameImpl::GetWebPluginForFind() { | 6032 blink::WebPlugin* RenderFrameImpl::GetWebPluginForFind() { |
6018 if (!is_main_frame_) | 6033 if (!is_main_frame_) |
6019 return nullptr; | 6034 return nullptr; |
6020 | 6035 |
6021 if (frame_->document().isPluginDocument()) | 6036 if (frame_->document().isPluginDocument()) |
6022 return frame_->document().to<WebPluginDocument>().plugin(); | 6037 return frame_->document().to<WebPluginDocument>().plugin(); |
6023 | 6038 |
6024 #if defined(ENABLE_PLUGINS) | 6039 #if defined(ENABLE_PLUGINS) |
6025 if (plugin_find_handler_) | 6040 if (plugin_find_handler_) |
6026 return plugin_find_handler_->container()->plugin(); | 6041 return plugin_find_handler_->container()->plugin(); |
6027 #endif | 6042 #endif |
6028 | 6043 |
6029 return nullptr; | 6044 return nullptr; |
6030 } | 6045 } |
6031 | 6046 |
6032 void RenderFrameImpl::SendFindReply(int request_id, | 6047 void RenderFrameImpl::SendFindReply(int request_id, |
6033 int match_count, | 6048 int match_count, |
6034 int ordinal, | 6049 int ordinal, |
6035 const WebRect& selection_rect, | 6050 const WebRect& selection_rect, |
6036 bool final_status_update) { | 6051 bool final_status_update) { |
6037 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, | 6052 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, |
6038 selection_rect, ordinal, | 6053 selection_rect, ordinal, |
6039 final_status_update)); | 6054 final_status_update)); |
6040 } | 6055 } |
6041 | 6056 |
6042 } // namespace content | 6057 } // namespace content |
OLD | NEW |