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/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" |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 307 return false; // Unable to create the desired RenderFrameHost. | 307 return false; // Unable to create the desired RenderFrameHost. |
| 308 | 308 |
| 309 // Make sure no code called via RFHM::Navigate clears the pending entry. | 309 // Make sure no code called via RFHM::Navigate clears the pending entry. |
| 310 CHECK_EQ(controller_->GetPendingEntry(), &entry); | 310 CHECK_EQ(controller_->GetPendingEntry(), &entry); |
| 311 | 311 |
| 312 // For security, we should never send non-Web-UI URLs to a Web UI renderer. | 312 // For security, we should never send non-Web-UI URLs to a Web UI renderer. |
| 313 // Double check that here. | 313 // Double check that here. |
| 314 CheckWebUIRendererDoesNotDisplayNormalURL(dest_render_frame_host, dest_url); | 314 CheckWebUIRendererDoesNotDisplayNormalURL(dest_render_frame_host, dest_url); |
| 315 | 315 |
| 316 // Notify observers that we will navigate in this RenderFrame. | 316 // Notify observers that we will navigate in this RenderFrame. |
| 317 if (delegate_) { | 317 if (delegate_ && !dest_render_frame_host->are_navigations_suspended()) { |
| 318 delegate_->AboutToNavigateRenderFrame(frame_tree_node->current_frame_host(), | 318 delegate_->AboutToNavigateRenderFrame(frame_tree_node->current_frame_host(), |
|
Charlie Reis
2015/09/22 23:12:10
What's happening in AboutToNavigateRenderFrame tha
dgozman
2015/09/22 23:27:55
It's called from another place.
Charlie Reis
2015/09/22 23:56:42
That didn't really answer my question, though.
Wh
| |
| 319 dest_render_frame_host); | 319 dest_render_frame_host); |
| 320 } | 320 } |
| 321 | 321 |
| 322 // Navigate in the desired RenderFrameHost. | 322 // Navigate in the desired RenderFrameHost. |
| 323 // We can skip this step in the rare case that this is a transfer navigation | 323 // We can skip this step in the rare case that this is a transfer navigation |
| 324 // which began in the chosen RenderFrameHost, since the request has already | 324 // which began in the chosen RenderFrameHost, since the request has already |
| 325 // been issued. In that case, simply resume the response. | 325 // been issued. In that case, simply resume the response. |
| 326 bool is_transfer_to_same = | 326 bool is_transfer_to_same = |
| 327 entry.transferred_global_request_id().child_id != -1 && | 327 entry.transferred_global_request_id().child_id != -1 && |
| 328 entry.transferred_global_request_id().child_id == | 328 entry.transferred_global_request_id().child_id == |
| (...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 945 entry->set_should_replace_entry(pending_entry->should_replace_entry()); | 945 entry->set_should_replace_entry(pending_entry->should_replace_entry()); |
| 946 entry->SetRedirectChain(pending_entry->GetRedirectChain()); | 946 entry->SetRedirectChain(pending_entry->GetRedirectChain()); |
| 947 } | 947 } |
| 948 controller_->SetPendingEntry(entry.Pass()); | 948 controller_->SetPendingEntry(entry.Pass()); |
| 949 if (delegate_) | 949 if (delegate_) |
| 950 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); | 950 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); |
| 951 } | 951 } |
| 952 } | 952 } |
| 953 | 953 |
| 954 } // namespace content | 954 } // namespace content |
| OLD | NEW |