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/render_frame_host_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 2509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2520 // message will be received asynchronously from the UI of the browser. But the | 2520 // message will be received asynchronously from the UI of the browser. But the |
2521 // throbber needs to be kept in sync with what's happening in the UI. For | 2521 // throbber needs to be kept in sync with what's happening in the UI. For |
2522 // example, the throbber will start immediately when the user navigates even | 2522 // example, the throbber will start immediately when the user navigates even |
2523 // if the renderer is delayed. There is also an issue with the throbber | 2523 // if the renderer is delayed. There is also an issue with the throbber |
2524 // starting because the WebUI (which controls whether the favicon is | 2524 // starting because the WebUI (which controls whether the favicon is |
2525 // displayed) happens synchronously. If the start loading messages was | 2525 // displayed) happens synchronously. If the start loading messages was |
2526 // asynchronous, then the default favicon would flash in. | 2526 // asynchronous, then the default favicon would flash in. |
2527 // | 2527 // |
2528 // Blink doesn't send throb notifications for JavaScript URLs, so it is not | 2528 // Blink doesn't send throb notifications for JavaScript URLs, so it is not |
2529 // done here either. | 2529 // done here either. |
2530 if (!common_params.url.SchemeIs(url::kJavaScriptScheme)) | 2530 if (!common_params.url.SchemeIs(url::kJavaScriptScheme) && |
| 2531 (!navigation_handle_ || !navigation_handle_->is_transferring())) { |
2531 OnDidStartLoading(true); | 2532 OnDidStartLoading(true); |
| 2533 } |
2532 } | 2534 } |
2533 | 2535 |
2534 void RenderFrameHostImpl::NavigateToInterstitialURL(const GURL& data_url) { | 2536 void RenderFrameHostImpl::NavigateToInterstitialURL(const GURL& data_url) { |
2535 DCHECK(data_url.SchemeIs(url::kDataScheme)); | 2537 DCHECK(data_url.SchemeIs(url::kDataScheme)); |
2536 CommonNavigationParams common_params( | 2538 CommonNavigationParams common_params( |
2537 data_url, Referrer(), ui::PAGE_TRANSITION_LINK, | 2539 data_url, Referrer(), ui::PAGE_TRANSITION_LINK, |
2538 FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT, false, false, | 2540 FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT, false, false, |
2539 base::TimeTicks::Now(), FrameMsg_UILoadMetricsReportType::NO_REPORT, | 2541 base::TimeTicks::Now(), FrameMsg_UILoadMetricsReportType::NO_REPORT, |
2540 GURL(), GURL(), PREVIEWS_OFF, base::TimeTicks::Now(), "GET", nullptr); | 2542 GURL(), GURL(), PREVIEWS_OFF, base::TimeTicks::Now(), "GET", nullptr); |
2541 if (IsBrowserSideNavigationEnabled()) { | 2543 if (IsBrowserSideNavigationEnabled()) { |
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3506 // There is no pending NavigationEntry in these cases, so pass 0 as the | 3508 // There is no pending NavigationEntry in these cases, so pass 0 as the |
3507 // pending_nav_entry_id. If the previous handle was a prematurely aborted | 3509 // pending_nav_entry_id. If the previous handle was a prematurely aborted |
3508 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. | 3510 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. |
3509 return NavigationHandleImpl::Create( | 3511 return NavigationHandleImpl::Create( |
3510 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, | 3512 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, |
3511 params.was_within_same_page, base::TimeTicks::Now(), | 3513 params.was_within_same_page, base::TimeTicks::Now(), |
3512 entry_id_for_data_nav, false); // started_from_context_menu | 3514 entry_id_for_data_nav, false); // started_from_context_menu |
3513 } | 3515 } |
3514 | 3516 |
3515 } // namespace content | 3517 } // namespace content |
OLD | NEW |