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/browser/frame_host/navigator_impl.h" | 5 #include "content/browser/frame_host/navigator_impl.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "content/browser/frame_host/frame_tree.h" | 10 #include "content/browser/frame_host/frame_tree.h" |
11 #include "content/browser/frame_host/frame_tree_node.h" | 11 #include "content/browser/frame_host/frame_tree_node.h" |
12 #include "content/browser/frame_host/navigation_controller_impl.h" | 12 #include "content/browser/frame_host/navigation_controller_impl.h" |
13 #include "content/browser/frame_host/navigation_entry_impl.h" | 13 #include "content/browser/frame_host/navigation_entry_impl.h" |
| 14 #include "content/browser/frame_host/navigation_handle_factory.h" |
14 #include "content/browser/frame_host/navigation_handle_impl.h" | 15 #include "content/browser/frame_host/navigation_handle_impl.h" |
15 #include "content/browser/frame_host/navigation_request.h" | 16 #include "content/browser/frame_host/navigation_request.h" |
16 #include "content/browser/frame_host/navigation_request_info.h" | 17 #include "content/browser/frame_host/navigation_request_info.h" |
17 #include "content/browser/frame_host/navigator_delegate.h" | 18 #include "content/browser/frame_host/navigator_delegate.h" |
18 #include "content/browser/frame_host/render_frame_host_impl.h" | 19 #include "content/browser/frame_host/render_frame_host_impl.h" |
19 #include "content/browser/renderer_host/render_view_host_impl.h" | 20 #include "content/browser/renderer_host/render_view_host_impl.h" |
20 #include "content/browser/site_instance_impl.h" | 21 #include "content/browser/site_instance_impl.h" |
21 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 22 #include "content/browser/webui/web_ui_controller_factory_registry.h" |
22 #include "content/browser/webui/web_ui_impl.h" | 23 #include "content/browser/webui/web_ui_impl.h" |
23 #include "content/common/frame_messages.h" | 24 #include "content/common/frame_messages.h" |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 return; | 153 return; |
153 } | 154 } |
154 | 155 |
155 // This ensures that notifications about the end of the previous | 156 // This ensures that notifications about the end of the previous |
156 // navigation are sent before notifications about the start of the | 157 // navigation are sent before notifications about the start of the |
157 // new navigation. | 158 // new navigation. |
158 render_frame_host->SetNavigationHandle(scoped_ptr<NavigationHandleImpl>()); | 159 render_frame_host->SetNavigationHandle(scoped_ptr<NavigationHandleImpl>()); |
159 } | 160 } |
160 | 161 |
161 render_frame_host->SetNavigationHandle( | 162 render_frame_host->SetNavigationHandle( |
162 NavigationHandleImpl::Create(url, is_main_frame, delegate_)); | 163 NavigationHandleFactory::Create(validated_url, is_main_frame, delegate_)); |
163 } | 164 } |
164 | 165 |
165 void NavigatorImpl::DidFailProvisionalLoadWithError( | 166 void NavigatorImpl::DidFailProvisionalLoadWithError( |
166 RenderFrameHostImpl* render_frame_host, | 167 RenderFrameHostImpl* render_frame_host, |
167 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) { | 168 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) { |
168 VLOG(1) << "Failed Provisional Load: " << params.url.possibly_invalid_spec() | 169 VLOG(1) << "Failed Provisional Load: " << params.url.possibly_invalid_spec() |
169 << ", error_code: " << params.error_code | 170 << ", error_code: " << params.error_code |
170 << ", error_description: " << params.error_description | 171 << ", error_description: " << params.error_description |
171 << ", showing_repost_interstitial: " << | 172 << ", showing_repost_interstitial: " << |
172 params.showing_repost_interstitial | 173 params.showing_repost_interstitial |
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 entry->set_should_replace_entry(pending_entry->should_replace_entry()); | 944 entry->set_should_replace_entry(pending_entry->should_replace_entry()); |
944 entry->SetRedirectChain(pending_entry->GetRedirectChain()); | 945 entry->SetRedirectChain(pending_entry->GetRedirectChain()); |
945 } | 946 } |
946 controller_->SetPendingEntry(entry.Pass()); | 947 controller_->SetPendingEntry(entry.Pass()); |
947 if (delegate_) | 948 if (delegate_) |
948 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); | 949 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); |
949 } | 950 } |
950 } | 951 } |
951 | 952 |
952 } // namespace content | 953 } // namespace content |
OLD | NEW |