Chromium Code Reviews| 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" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 100 #include "media/base/audio_renderer_mixer_input.h" | 100 #include "media/base/audio_renderer_mixer_input.h" |
| 101 #include "media/base/media_log.h" | 101 #include "media/base/media_log.h" |
| 102 #include "media/blink/webcontentdecryptionmodule_impl.h" | 102 #include "media/blink/webcontentdecryptionmodule_impl.h" |
| 103 #include "media/blink/webencryptedmediaclient_impl.h" | 103 #include "media/blink/webencryptedmediaclient_impl.h" |
| 104 #include "media/blink/webmediaplayer_impl.h" | 104 #include "media/blink/webmediaplayer_impl.h" |
| 105 #include "media/blink/webmediaplayer_params.h" | 105 #include "media/blink/webmediaplayer_params.h" |
| 106 #include "media/filters/gpu_video_accelerator_factories.h" | 106 #include "media/filters/gpu_video_accelerator_factories.h" |
| 107 #include "net/base/data_url.h" | 107 #include "net/base/data_url.h" |
| 108 #include "net/base/net_errors.h" | 108 #include "net/base/net_errors.h" |
| 109 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | 109 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
| 110 #include "net/cert/cert_status_flags.h" | |
| 110 #include "net/http/http_util.h" | 111 #include "net/http/http_util.h" |
| 111 #include "third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h" | 112 #include "third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h" |
| 112 #include "third_party/WebKit/public/platform/WebString.h" | 113 #include "third_party/WebKit/public/platform/WebString.h" |
| 113 #include "third_party/WebKit/public/platform/WebURL.h" | 114 #include "third_party/WebKit/public/platform/WebURL.h" |
| 114 #include "third_party/WebKit/public/platform/WebURLError.h" | 115 #include "third_party/WebKit/public/platform/WebURLError.h" |
| 115 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 116 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
| 116 #include "third_party/WebKit/public/platform/WebVector.h" | 117 #include "third_party/WebKit/public/platform/WebVector.h" |
| 117 #include "third_party/WebKit/public/web/WebColorSuggestion.h" | 118 #include "third_party/WebKit/public/web/WebColorSuggestion.h" |
| 119 #include "third_party/WebKit/public/web/WebConsoleMessage.h" | |
| 118 #include "third_party/WebKit/public/web/WebDocument.h" | 120 #include "third_party/WebKit/public/web/WebDocument.h" |
| 119 #include "third_party/WebKit/public/web/WebFrameWidget.h" | 121 #include "third_party/WebKit/public/web/WebFrameWidget.h" |
| 120 #include "third_party/WebKit/public/web/WebGlyphCache.h" | 122 #include "third_party/WebKit/public/web/WebGlyphCache.h" |
| 121 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 123 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| 122 #include "third_party/WebKit/public/web/WebMediaStreamRegistry.h" | 124 #include "third_party/WebKit/public/web/WebMediaStreamRegistry.h" |
| 123 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" | 125 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" |
| 124 #include "third_party/WebKit/public/web/WebPlugin.h" | 126 #include "third_party/WebKit/public/web/WebPlugin.h" |
| 125 #include "third_party/WebKit/public/web/WebPluginParams.h" | 127 #include "third_party/WebKit/public/web/WebPluginParams.h" |
| 126 #include "third_party/WebKit/public/web/WebPluginPlaceholder.h" | 128 #include "third_party/WebKit/public/web/WebPluginPlaceholder.h" |
| 127 #include "third_party/WebKit/public/web/WebRange.h" | 129 #include "third_party/WebKit/public/web/WebRange.h" |
| (...skipping 2607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2735 TRACE_EVENT_INSTANT0("WebCore", "LoadFinished", | 2737 TRACE_EVENT_INSTANT0("WebCore", "LoadFinished", |
| 2736 TRACE_EVENT_SCOPE_PROCESS); | 2738 TRACE_EVENT_SCOPE_PROCESS); |
| 2737 } | 2739 } |
| 2738 document_state->set_finish_load_time(Time::Now()); | 2740 document_state->set_finish_load_time(Time::Now()); |
| 2739 } | 2741 } |
| 2740 | 2742 |
| 2741 FOR_EACH_OBSERVER(RenderViewObserver, render_view_->observers(), | 2743 FOR_EACH_OBSERVER(RenderViewObserver, render_view_->observers(), |
| 2742 DidFinishLoad(frame)); | 2744 DidFinishLoad(frame)); |
| 2743 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, DidFinishLoad()); | 2745 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, DidFinishLoad()); |
| 2744 | 2746 |
| 2747 // If the navigation is to a localhost URL, print a warning to the | |
| 2748 // console telling the developer to check their SSL configuration | |
| 2749 // before going to production. | |
| 2750 // | |
| 2751 // TODO(estark): do we want to print this only if the | |
| 2752 // kAllowInsecureLocalhost flag is set? | |
|
Ryan Sleevi
2015/02/04 19:34:42
That's my gut feeling too.
Note, our use of TODO
estark
2015/02/05 03:02:38
Done.
| |
| 2753 SSLStatus ssl_status = render_view_->GetSSLStatusOfFrame(frame_); | |
| 2754 if (net::IsCertStatusError(ssl_status.cert_status) && | |
| 2755 GURL(ds->request().url()).DomainIs("localhost")) { | |
| 2756 frame_->addMessageToConsole( | |
| 2757 blink::WebConsoleMessage( | |
| 2758 blink::WebConsoleMessage::LevelWarning, | |
| 2759 base::ASCIIToUTF16("This site does not have a valid SSL " | |
| 2760 "certificate! Without SSL, your site's and " | |
| 2761 "visitors' data is vulnerable to theft and " | |
| 2762 "tampering. Get a valid SSL certificate before " | |
| 2763 "releasing your website to the public."))); | |
| 2764 } | |
| 2765 | |
| 2745 // Don't send this message while the frame is swapped out. | 2766 // Don't send this message while the frame is swapped out. |
| 2746 if (is_swapped_out()) | 2767 if (is_swapped_out()) |
| 2747 return; | 2768 return; |
| 2748 | 2769 |
| 2749 Send(new FrameHostMsg_DidFinishLoad(routing_id_, | 2770 Send(new FrameHostMsg_DidFinishLoad(routing_id_, |
| 2750 ds->request().url())); | 2771 ds->request().url())); |
| 2751 } | 2772 } |
| 2752 | 2773 |
| 2753 void RenderFrameImpl::didNavigateWithinPage(blink::WebLocalFrame* frame, | 2774 void RenderFrameImpl::didNavigateWithinPage(blink::WebLocalFrame* frame, |
| 2754 const blink::WebHistoryItem& item, | 2775 const blink::WebHistoryItem& item, |
| (...skipping 1722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4477 | 4498 |
| 4478 #if defined(ENABLE_BROWSER_CDMS) | 4499 #if defined(ENABLE_BROWSER_CDMS) |
| 4479 RendererCdmManager* RenderFrameImpl::GetCdmManager() { | 4500 RendererCdmManager* RenderFrameImpl::GetCdmManager() { |
| 4480 if (!cdm_manager_) | 4501 if (!cdm_manager_) |
| 4481 cdm_manager_ = new RendererCdmManager(this); | 4502 cdm_manager_ = new RendererCdmManager(this); |
| 4482 return cdm_manager_; | 4503 return cdm_manager_; |
| 4483 } | 4504 } |
| 4484 #endif // defined(ENABLE_BROWSER_CDMS) | 4505 #endif // defined(ENABLE_BROWSER_CDMS) |
| 4485 | 4506 |
| 4486 } // namespace content | 4507 } // namespace content |
| OLD | NEW |