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/frame_tree_node.h" | 5 #include "content/browser/frame_host/frame_tree_node.h" |
| 6 | 6 |
| 7 #include <queue> | 7 #include <queue> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 376 // state, this matches what Blink is doing: Blink doesn't send throbber | 376 // state, this matches what Blink is doing: Blink doesn't send throbber |
| 377 // notifications for Javascript URLS. | 377 // notifications for Javascript URLS. |
| 378 DCHECK(!navigation_request->common_params().url.SchemeIs( | 378 DCHECK(!navigation_request->common_params().url.SchemeIs( |
| 379 url::kJavaScriptScheme)); | 379 url::kJavaScriptScheme)); |
| 380 | 380 |
| 381 bool was_previously_loading = frame_tree()->IsLoading(); | 381 bool was_previously_loading = frame_tree()->IsLoading(); |
| 382 | 382 |
| 383 // There's no need to reset the state: there's still an ongoing load, and the | 383 // There's no need to reset the state: there's still an ongoing load, and the |
| 384 // RenderFrameHostManager will take care of updates to the speculative | 384 // RenderFrameHostManager will take care of updates to the speculative |
| 385 // RenderFrameHost in DidCreateNavigationRequest below. | 385 // RenderFrameHost in DidCreateNavigationRequest below. |
| 386 if (was_previously_loading) | 386 if (was_previously_loading) { |
| 387 if (navigation_request_) { | |
| 388 // Mark the old request as aborted. | |
| 389 navigation_request_->navigation_handle()->set_net_error_code( | |
|
Charlie Reis
2017/03/24 20:11:09
I'm curious if this belongs in ResetNavigationRequ
jam
2017/03/24 22:08:26
That's a good question; I didn't see any obvious p
| |
| 390 net::ERR_ABORTED); | |
| 391 } | |
| 387 ResetNavigationRequest(true, true); | 392 ResetNavigationRequest(true, true); |
| 393 } | |
| 388 | 394 |
| 389 navigation_request_ = std::move(navigation_request); | 395 navigation_request_ = std::move(navigation_request); |
| 390 render_manager()->DidCreateNavigationRequest(navigation_request_.get()); | 396 render_manager()->DidCreateNavigationRequest(navigation_request_.get()); |
| 391 | 397 |
| 392 bool to_different_document = !FrameMsg_Navigate_Type::IsSameDocument( | 398 bool to_different_document = !FrameMsg_Navigate_Type::IsSameDocument( |
| 393 navigation_request_->common_params().navigation_type); | 399 navigation_request_->common_params().navigation_type); |
| 394 | 400 |
| 395 DidStartLoading(to_different_document, was_previously_loading); | 401 DidStartLoading(to_different_document, was_previously_loading); |
| 396 } | 402 } |
| 397 | 403 |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 564 } | 570 } |
| 565 return parent_->child_at(i + relative_offset); | 571 return parent_->child_at(i + relative_offset); |
| 566 } | 572 } |
| 567 } | 573 } |
| 568 | 574 |
| 569 NOTREACHED() << "FrameTreeNode not found in its parent's children."; | 575 NOTREACHED() << "FrameTreeNode not found in its parent's children."; |
| 570 return nullptr; | 576 return nullptr; |
| 571 } | 577 } |
| 572 | 578 |
| 573 } // namespace content | 579 } // namespace content |
| OLD | NEW |