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 2495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2506 // message will be received asynchronously from the UI of the browser. But the | 2506 // message will be received asynchronously from the UI of the browser. But the |
2507 // throbber needs to be kept in sync with what's happening in the UI. For | 2507 // throbber needs to be kept in sync with what's happening in the UI. For |
2508 // example, the throbber will start immediately when the user navigates even | 2508 // example, the throbber will start immediately when the user navigates even |
2509 // if the renderer is delayed. There is also an issue with the throbber | 2509 // if the renderer is delayed. There is also an issue with the throbber |
2510 // starting because the WebUI (which controls whether the favicon is | 2510 // starting because the WebUI (which controls whether the favicon is |
2511 // displayed) happens synchronously. If the start loading messages was | 2511 // displayed) happens synchronously. If the start loading messages was |
2512 // asynchronous, then the default favicon would flash in. | 2512 // asynchronous, then the default favicon would flash in. |
2513 // | 2513 // |
2514 // Blink doesn't send throb notifications for JavaScript URLs, so it is not | 2514 // Blink doesn't send throb notifications for JavaScript URLs, so it is not |
2515 // done here either. | 2515 // done here either. |
2516 if (!common_params.url.SchemeIs(url::kJavaScriptScheme)) | 2516 if (!common_params.url.SchemeIs(url::kJavaScriptScheme) && |
| 2517 (!navigation_handle_ || !navigation_handle_->is_transferring())) { |
2517 OnDidStartLoading(true); | 2518 OnDidStartLoading(true); |
| 2519 } |
2518 } | 2520 } |
2519 | 2521 |
2520 void RenderFrameHostImpl::NavigateToInterstitialURL(const GURL& data_url) { | 2522 void RenderFrameHostImpl::NavigateToInterstitialURL(const GURL& data_url) { |
2521 DCHECK(data_url.SchemeIs(url::kDataScheme)); | 2523 DCHECK(data_url.SchemeIs(url::kDataScheme)); |
2522 CommonNavigationParams common_params( | 2524 CommonNavigationParams common_params( |
2523 data_url, Referrer(), ui::PAGE_TRANSITION_LINK, | 2525 data_url, Referrer(), ui::PAGE_TRANSITION_LINK, |
2524 FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT, false, false, | 2526 FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT, false, false, |
2525 base::TimeTicks::Now(), FrameMsg_UILoadMetricsReportType::NO_REPORT, | 2527 base::TimeTicks::Now(), FrameMsg_UILoadMetricsReportType::NO_REPORT, |
2526 GURL(), GURL(), PREVIEWS_OFF, base::TimeTicks::Now(), "GET", nullptr); | 2528 GURL(), GURL(), PREVIEWS_OFF, base::TimeTicks::Now(), "GET", nullptr); |
2527 if (IsBrowserSideNavigationEnabled()) { | 2529 if (IsBrowserSideNavigationEnabled()) { |
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3492 // There is no pending NavigationEntry in these cases, so pass 0 as the | 3494 // There is no pending NavigationEntry in these cases, so pass 0 as the |
3493 // pending_nav_entry_id. If the previous handle was a prematurely aborted | 3495 // pending_nav_entry_id. If the previous handle was a prematurely aborted |
3494 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. | 3496 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. |
3495 return NavigationHandleImpl::Create( | 3497 return NavigationHandleImpl::Create( |
3496 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, | 3498 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, |
3497 params.was_within_same_page, base::TimeTicks::Now(), | 3499 params.was_within_same_page, base::TimeTicks::Now(), |
3498 entry_id_for_data_nav, false); // started_from_context_menu | 3500 entry_id_for_data_nav, false); // started_from_context_menu |
3499 } | 3501 } |
3500 | 3502 |
3501 } // namespace content | 3503 } // namespace content |
OLD | NEW |