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 ContentSecurityPolicyHeader header; |
| 6023 header.header_value = base::UTF16ToUTF8(base::StringPiece16(header_value)); |
| 6024 header.type = type; |
| 6025 header.source = source; |
| 6026 Send(new FrameHostMsg_DidAddContentSecurityPolicy(routing_id_, header)); |
| 6027 } |
| 6028 |
6017 blink::WebPlugin* RenderFrameImpl::GetWebPluginForFind() { | 6029 blink::WebPlugin* RenderFrameImpl::GetWebPluginForFind() { |
6018 if (!is_main_frame_) | 6030 if (!is_main_frame_) |
6019 return nullptr; | 6031 return nullptr; |
6020 | 6032 |
6021 if (frame_->document().isPluginDocument()) | 6033 if (frame_->document().isPluginDocument()) |
6022 return frame_->document().to<WebPluginDocument>().plugin(); | 6034 return frame_->document().to<WebPluginDocument>().plugin(); |
6023 | 6035 |
6024 #if defined(ENABLE_PLUGINS) | 6036 #if defined(ENABLE_PLUGINS) |
6025 if (plugin_find_handler_) | 6037 if (plugin_find_handler_) |
6026 return plugin_find_handler_->container()->plugin(); | 6038 return plugin_find_handler_->container()->plugin(); |
6027 #endif | 6039 #endif |
6028 | 6040 |
6029 return nullptr; | 6041 return nullptr; |
6030 } | 6042 } |
6031 | 6043 |
6032 void RenderFrameImpl::SendFindReply(int request_id, | 6044 void RenderFrameImpl::SendFindReply(int request_id, |
6033 int match_count, | 6045 int match_count, |
6034 int ordinal, | 6046 int ordinal, |
6035 const WebRect& selection_rect, | 6047 const WebRect& selection_rect, |
6036 bool final_status_update) { | 6048 bool final_status_update) { |
6037 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, | 6049 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, |
6038 selection_rect, ordinal, | 6050 selection_rect, ordinal, |
6039 final_status_update)); | 6051 final_status_update)); |
6040 } | 6052 } |
6041 | 6053 |
6042 } // namespace content | 6054 } // namespace content |
OLD | NEW |