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/time/time.h" | 8 #include "base/time/time.h" |
9 #include "content/browser/frame_host/frame_tree.h" | 9 #include "content/browser/frame_host/frame_tree.h" |
10 #include "content/browser/frame_host/frame_tree_node.h" | 10 #include "content/browser/frame_host/frame_tree_node.h" |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 : controller_(navigation_controller), | 142 : controller_(navigation_controller), |
143 delegate_(delegate) { | 143 delegate_(delegate) { |
144 } | 144 } |
145 | 145 |
146 NavigationController* NavigatorImpl::GetController() { | 146 NavigationController* NavigatorImpl::GetController() { |
147 return controller_; | 147 return controller_; |
148 } | 148 } |
149 | 149 |
150 void NavigatorImpl::DidStartProvisionalLoad( | 150 void NavigatorImpl::DidStartProvisionalLoad( |
151 RenderFrameHostImpl* render_frame_host, | 151 RenderFrameHostImpl* render_frame_host, |
152 const GURL& url) { | 152 const GURL& url, |
| 153 bool is_transition_navigation) { |
153 bool is_error_page = (url.spec() == kUnreachableWebDataURL); | 154 bool is_error_page = (url.spec() == kUnreachableWebDataURL); |
154 bool is_iframe_srcdoc = (url.spec() == kAboutSrcDocURL); | 155 bool is_iframe_srcdoc = (url.spec() == kAboutSrcDocURL); |
155 GURL validated_url(url); | 156 GURL validated_url(url); |
156 RenderProcessHost* render_process_host = render_frame_host->GetProcess(); | 157 RenderProcessHost* render_process_host = render_frame_host->GetProcess(); |
157 render_process_host->FilterURL(false, &validated_url); | 158 render_process_host->FilterURL(false, &validated_url); |
158 | 159 |
159 bool is_main_frame = render_frame_host->frame_tree_node()->IsMainFrame(); | 160 bool is_main_frame = render_frame_host->frame_tree_node()->IsMainFrame(); |
160 NavigationEntryImpl* pending_entry = | 161 NavigationEntryImpl* pending_entry = |
161 NavigationEntryImpl::FromNavigationEntry(controller_->GetPendingEntry()); | 162 NavigationEntryImpl::FromNavigationEntry(controller_->GetPendingEntry()); |
162 if (is_main_frame) { | 163 if (is_main_frame) { |
(...skipping 20 matching lines...) Expand all Loading... |
183 if (pending_entry) { | 184 if (pending_entry) { |
184 entry->set_transferred_global_request_id( | 185 entry->set_transferred_global_request_id( |
185 pending_entry->transferred_global_request_id()); | 186 pending_entry->transferred_global_request_id()); |
186 entry->set_should_replace_entry(pending_entry->should_replace_entry()); | 187 entry->set_should_replace_entry(pending_entry->should_replace_entry()); |
187 entry->SetRedirectChain(pending_entry->GetRedirectChain()); | 188 entry->SetRedirectChain(pending_entry->GetRedirectChain()); |
188 } | 189 } |
189 controller_->SetPendingEntry(entry); | 190 controller_->SetPendingEntry(entry); |
190 if (delegate_) | 191 if (delegate_) |
191 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); | 192 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); |
192 } | 193 } |
| 194 |
| 195 if (delegate_ && is_transition_navigation) |
| 196 delegate_->DidStartNavigationTransition(render_frame_host); |
193 } | 197 } |
194 | 198 |
195 if (delegate_) { | 199 if (delegate_) { |
196 // Notify the observer about the start of the provisional load. | 200 // Notify the observer about the start of the provisional load. |
197 delegate_->DidStartProvisionalLoad( | 201 delegate_->DidStartProvisionalLoad( |
198 render_frame_host, validated_url, is_error_page, is_iframe_srcdoc); | 202 render_frame_host, validated_url, is_error_page, is_iframe_srcdoc); |
199 } | 203 } |
200 } | 204 } |
201 | 205 |
202 | 206 |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 | 635 |
632 // Navigations in Web UI pages count as browser-initiated navigations. | 636 // Navigations in Web UI pages count as browser-initiated navigations. |
633 params.is_renderer_initiated = false; | 637 params.is_renderer_initiated = false; |
634 } | 638 } |
635 | 639 |
636 if (delegate_) | 640 if (delegate_) |
637 delegate_->RequestOpenURL(render_frame_host, params); | 641 delegate_->RequestOpenURL(render_frame_host, params); |
638 } | 642 } |
639 | 643 |
640 } // namespace content | 644 } // namespace content |
OLD | NEW |