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 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/debug/alias.h" | 12 #include "base/debug/alias.h" |
13 #include "base/debug/asan_invalid_access.h" | 13 #include "base/debug/asan_invalid_access.h" |
14 #include "base/debug/dump_without_crashing.h" | 14 #include "base/debug/dump_without_crashing.h" |
15 #include "base/i18n/char_iterator.h" | 15 #include "base/i18n/char_iterator.h" |
16 #include "base/metrics/histogram.h" | 16 #include "base/metrics/histogram.h" |
17 #include "base/process/kill.h" | 17 #include "base/process/kill.h" |
18 #include "base/process/process.h" | 18 #include "base/process/process.h" |
19 #include "base/strings/string16.h" | 19 #include "base/strings/string16.h" |
20 #include "base/strings/utf_string_conversions.h" | 20 #include "base/strings/utf_string_conversions.h" |
21 #include "base/time/time.h" | 21 #include "base/time/time.h" |
22 #include "content/child/appcache/appcache_dispatcher.h" | 22 #include "content/child/appcache/appcache_dispatcher.h" |
23 #include "content/child/plugin_messages.h" | 23 #include "content/child/plugin_messages.h" |
24 #include "content/child/quota_dispatcher.h" | 24 #include "content/child/quota_dispatcher.h" |
25 #include "content/child/request_extra_data.h" | 25 #include "content/child/request_extra_data.h" |
26 #include "content/child/service_worker/service_worker_network_provider.h" | 26 #include "content/child/service_worker/service_worker_network_provider.h" |
27 #include "content/child/service_worker/web_service_worker_provider_impl.h" | 27 #include "content/child/service_worker/web_service_worker_provider_impl.h" |
28 #include "content/child/web_socket_stream_handle_impl.h" | 28 #include "content/child/web_socket_stream_handle_impl.h" |
| 29 #include "content/child/web_url_request_util.h" |
29 #include "content/child/webmessageportchannel_impl.h" | 30 #include "content/child/webmessageportchannel_impl.h" |
30 #include "content/child/websocket_bridge.h" | 31 #include "content/child/websocket_bridge.h" |
31 #include "content/child/weburlresponse_extradata_impl.h" | 32 #include "content/child/weburlresponse_extradata_impl.h" |
32 #include "content/common/clipboard_messages.h" | 33 #include "content/common/clipboard_messages.h" |
33 #include "content/common/frame_messages.h" | 34 #include "content/common/frame_messages.h" |
34 #include "content/common/input_messages.h" | 35 #include "content/common/input_messages.h" |
35 #include "content/common/service_worker/service_worker_types.h" | 36 #include "content/common/service_worker/service_worker_types.h" |
36 #include "content/common/socket_stream_handle_data.h" | 37 #include "content/common/socket_stream_handle_data.h" |
37 #include "content/common/swapped_out_messages.h" | 38 #include "content/common/swapped_out_messages.h" |
38 #include "content/common/view_messages.h" | 39 #include "content/common/view_messages.h" |
(...skipping 2618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2657 return; | 2658 return; |
2658 | 2659 |
2659 // Let the browser know we loaded a resource from the memory cache. This | 2660 // Let the browser know we loaded a resource from the memory cache. This |
2660 // message is needed to display the correct SSL indicators. | 2661 // message is needed to display the correct SSL indicators. |
2661 render_view_->Send(new ViewHostMsg_DidLoadResourceFromMemoryCache( | 2662 render_view_->Send(new ViewHostMsg_DidLoadResourceFromMemoryCache( |
2662 render_view_->GetRoutingID(), | 2663 render_view_->GetRoutingID(), |
2663 url, | 2664 url, |
2664 response.securityInfo(), | 2665 response.securityInfo(), |
2665 request.httpMethod().utf8(), | 2666 request.httpMethod().utf8(), |
2666 response.mimeType().utf8(), | 2667 response.mimeType().utf8(), |
2667 ResourceType::FromWebURLRequest(request))); | 2668 WebURLRequestToResourceType(request))); |
2668 } | 2669 } |
2669 | 2670 |
2670 void RenderFrameImpl::didDisplayInsecureContent(blink::WebLocalFrame* frame) { | 2671 void RenderFrameImpl::didDisplayInsecureContent(blink::WebLocalFrame* frame) { |
2671 DCHECK(!frame_ || frame_ == frame); | 2672 DCHECK(!frame_ || frame_ == frame); |
2672 render_view_->Send(new ViewHostMsg_DidDisplayInsecureContent( | 2673 render_view_->Send(new ViewHostMsg_DidDisplayInsecureContent( |
2673 render_view_->GetRoutingID())); | 2674 render_view_->GetRoutingID())); |
2674 } | 2675 } |
2675 | 2676 |
2676 void RenderFrameImpl::didRunInsecureContent( | 2677 void RenderFrameImpl::didRunInsecureContent( |
2677 blink::WebLocalFrame* frame, | 2678 blink::WebLocalFrame* frame, |
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3638 | 3639 |
3639 #if defined(ENABLE_BROWSER_CDMS) | 3640 #if defined(ENABLE_BROWSER_CDMS) |
3640 RendererCdmManager* RenderFrameImpl::GetCdmManager() { | 3641 RendererCdmManager* RenderFrameImpl::GetCdmManager() { |
3641 if (!cdm_manager_) | 3642 if (!cdm_manager_) |
3642 cdm_manager_ = new RendererCdmManager(this); | 3643 cdm_manager_ = new RendererCdmManager(this); |
3643 return cdm_manager_; | 3644 return cdm_manager_; |
3644 } | 3645 } |
3645 #endif // defined(ENABLE_BROWSER_CDMS) | 3646 #endif // defined(ENABLE_BROWSER_CDMS) |
3646 | 3647 |
3647 } // namespace content | 3648 } // namespace content |
OLD | NEW |