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 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 3642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3653 if (render_thread_impl) { // Can be NULL in tests. | 3653 if (render_thread_impl) { // Can be NULL in tests. |
3654 render_thread_impl->histogram_customizer()-> | 3654 render_thread_impl->histogram_customizer()-> |
3655 RenderViewNavigatedToHost(GURL(GetLoadingUrl()).host(), | 3655 RenderViewNavigatedToHost(GURL(GetLoadingUrl()).host(), |
3656 RenderView::GetRenderViewCount()); | 3656 RenderView::GetRenderViewCount()); |
3657 // The scheduler isn't interested in history inert commits unless they | 3657 // The scheduler isn't interested in history inert commits unless they |
3658 // are reloads. | 3658 // are reloads. |
3659 if (commit_type != blink::kWebHistoryInertCommit || | 3659 if (commit_type != blink::kWebHistoryInertCommit || |
3660 PageTransitionCoreTypeIs(navigation_state->GetTransitionType(), | 3660 PageTransitionCoreTypeIs(navigation_state->GetTransitionType(), |
3661 ui::PAGE_TRANSITION_RELOAD)) { | 3661 ui::PAGE_TRANSITION_RELOAD)) { |
3662 render_thread_impl->GetRendererScheduler()->OnNavigationStarted(); | 3662 render_thread_impl->GetRendererScheduler()->OnNavigationStarted(); |
3663 render_thread_impl->GetRendererScheduler()->OnCommitProvisionalLoad(); | |
Charlie Reis
2017/06/02 22:38:36
Why do we need both?
Liquan (Max) Gu
2017/06/02 23:32:06
There are two OnNavigationStarted(). One is this;
Charlie Reis
2017/06/05 05:02:34
No, I think OnCommitProvisionalLoad was a better n
Liquan (Max) Gu
2017/06/05 16:15:56
Thanks for the detailed explanation. I have added
| |
3663 } | 3664 } |
3664 } | 3665 } |
3665 } | 3666 } |
3666 | 3667 |
3667 // Remember that we've already processed this request, so we don't update | 3668 // Remember that we've already processed this request, so we don't update |
3668 // the session history again. We do this regardless of whether this is | 3669 // the session history again. We do this regardless of whether this is |
3669 // a session history navigation, because if we attempted a session history | 3670 // a session history navigation, because if we attempted a session history |
3670 // navigation without valid HistoryItem state, WebCore will think it is a | 3671 // navigation without valid HistoryItem state, WebCore will think it is a |
3671 // new navigation. | 3672 // new navigation. |
3672 navigation_state->set_request_committed(true); | 3673 navigation_state->set_request_committed(true); |
(...skipping 3109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6782 policy(info.default_policy), | 6783 policy(info.default_policy), |
6783 replaces_current_history_item(info.replaces_current_history_item), | 6784 replaces_current_history_item(info.replaces_current_history_item), |
6784 history_navigation_in_new_child_frame( | 6785 history_navigation_in_new_child_frame( |
6785 info.is_history_navigation_in_new_child_frame), | 6786 info.is_history_navigation_in_new_child_frame), |
6786 client_redirect(info.is_client_redirect), | 6787 client_redirect(info.is_client_redirect), |
6787 cache_disabled(info.is_cache_disabled), | 6788 cache_disabled(info.is_cache_disabled), |
6788 form(info.form), | 6789 form(info.form), |
6789 source_location(info.source_location) {} | 6790 source_location(info.source_location) {} |
6790 | 6791 |
6791 } // namespace content | 6792 } // namespace content |
OLD | NEW |