| 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 2826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2837 GetContentClient()->renderer()->GetNavigationErrorStrings( | 2837 GetContentClient()->renderer()->GetNavigationErrorStrings( |
| 2838 render_view_.get(), | 2838 render_view_.get(), |
| 2839 frame, | 2839 frame, |
| 2840 failed_request, | 2840 failed_request, |
| 2841 error, | 2841 error, |
| 2842 NULL, | 2842 NULL, |
| 2843 &error_description); | 2843 &error_description); |
| 2844 Send(new FrameHostMsg_DidFailLoadWithError(routing_id_, | 2844 Send(new FrameHostMsg_DidFailLoadWithError(routing_id_, |
| 2845 failed_request.url(), | 2845 failed_request.url(), |
| 2846 error.reason, | 2846 error.reason, |
| 2847 error_description)); | 2847 error_description, |
| 2848 error.wasIgnoredByHandler)); |
| 2848 } | 2849 } |
| 2849 | 2850 |
| 2850 void RenderFrameImpl::didFinishLoad(blink::WebLocalFrame* frame) { | 2851 void RenderFrameImpl::didFinishLoad(blink::WebLocalFrame* frame) { |
| 2851 TRACE_EVENT1("navigation", "RenderFrameImpl::didFinishLoad", | 2852 TRACE_EVENT1("navigation", "RenderFrameImpl::didFinishLoad", |
| 2852 "id", routing_id_); | 2853 "id", routing_id_); |
| 2853 DCHECK(!frame_ || frame_ == frame); | 2854 DCHECK(!frame_ || frame_ == frame); |
| 2854 WebDataSource* ds = frame->dataSource(); | 2855 WebDataSource* ds = frame->dataSource(); |
| 2855 DocumentState* document_state = DocumentState::FromDataSource(ds); | 2856 DocumentState* document_state = DocumentState::FromDataSource(ds); |
| 2856 if (document_state->finish_load_time().is_null()) { | 2857 if (document_state->finish_load_time().is_null()) { |
| 2857 if (!frame->parent()) { | 2858 if (!frame->parent()) { |
| (...skipping 1901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4759 (error.reason == net::ERR_CACHE_MISS && | 4760 (error.reason == net::ERR_CACHE_MISS && |
| 4760 base::EqualsASCII(request.httpMethod(), "POST")); | 4761 base::EqualsASCII(request.httpMethod(), "POST")); |
| 4761 | 4762 |
| 4762 FrameHostMsg_DidFailProvisionalLoadWithError_Params params; | 4763 FrameHostMsg_DidFailProvisionalLoadWithError_Params params; |
| 4763 params.error_code = error.reason; | 4764 params.error_code = error.reason; |
| 4764 GetContentClient()->renderer()->GetNavigationErrorStrings( | 4765 GetContentClient()->renderer()->GetNavigationErrorStrings( |
| 4765 render_view_.get(), frame, request, error, NULL, | 4766 render_view_.get(), frame, request, error, NULL, |
| 4766 ¶ms.error_description); | 4767 ¶ms.error_description); |
| 4767 params.url = error.unreachableURL; | 4768 params.url = error.unreachableURL; |
| 4768 params.showing_repost_interstitial = show_repost_interstitial; | 4769 params.showing_repost_interstitial = show_repost_interstitial; |
| 4770 params.was_ignored_by_handler = error.wasIgnoredByHandler; |
| 4769 Send(new FrameHostMsg_DidFailProvisionalLoadWithError(routing_id_, params)); | 4771 Send(new FrameHostMsg_DidFailProvisionalLoadWithError(routing_id_, params)); |
| 4770 } | 4772 } |
| 4771 | 4773 |
| 4772 bool RenderFrameImpl::ShouldDisplayErrorPageForFailedLoad( | 4774 bool RenderFrameImpl::ShouldDisplayErrorPageForFailedLoad( |
| 4773 int error_code, | 4775 int error_code, |
| 4774 const GURL& unreachable_url) { | 4776 const GURL& unreachable_url) { |
| 4775 // Don't display an error page if this is simply a cancelled load. Aside | 4777 // Don't display an error page if this is simply a cancelled load. Aside |
| 4776 // from being dumb, Blink doesn't expect it and it will cause a crash. | 4778 // from being dumb, Blink doesn't expect it and it will cause a crash. |
| 4777 if (error_code == net::ERR_ABORTED) | 4779 if (error_code == net::ERR_ABORTED) |
| 4778 return false; | 4780 return false; |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4948 #elif defined(ENABLE_BROWSER_CDMS) | 4950 #elif defined(ENABLE_BROWSER_CDMS) |
| 4949 cdm_manager_, | 4951 cdm_manager_, |
| 4950 #endif | 4952 #endif |
| 4951 this); | 4953 this); |
| 4952 } | 4954 } |
| 4953 | 4955 |
| 4954 return cdm_factory_; | 4956 return cdm_factory_; |
| 4955 } | 4957 } |
| 4956 | 4958 |
| 4957 } // namespace content | 4959 } // namespace content |
| OLD | NEW |