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 2451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2462 // message will be received asynchronously from the UI of the browser. But the | 2462 // message will be received asynchronously from the UI of the browser. But the |
2463 // throbber needs to be kept in sync with what's happening in the UI. For | 2463 // throbber needs to be kept in sync with what's happening in the UI. For |
2464 // example, the throbber will start immediately when the user navigates even | 2464 // example, the throbber will start immediately when the user navigates even |
2465 // if the renderer is delayed. There is also an issue with the throbber | 2465 // if the renderer is delayed. There is also an issue with the throbber |
2466 // starting because the WebUI (which controls whether the favicon is | 2466 // starting because the WebUI (which controls whether the favicon is |
2467 // displayed) happens synchronously. If the start loading messages was | 2467 // displayed) happens synchronously. If the start loading messages was |
2468 // asynchronous, then the default favicon would flash in. | 2468 // asynchronous, then the default favicon would flash in. |
2469 // | 2469 // |
2470 // Blink doesn't send throb notifications for JavaScript URLs, so it is not | 2470 // Blink doesn't send throb notifications for JavaScript URLs, so it is not |
2471 // done here either. | 2471 // done here either. |
2472 if (!common_params.url.SchemeIs(url::kJavaScriptScheme)) | 2472 if (!common_params.url.SchemeIs(url::kJavaScriptScheme) && |
| 2473 (!navigation_handle_ || !navigation_handle_->is_transferring())) { |
2473 OnDidStartLoading(true); | 2474 OnDidStartLoading(true); |
| 2475 } |
2474 } | 2476 } |
2475 | 2477 |
2476 void RenderFrameHostImpl::NavigateToInterstitialURL(const GURL& data_url) { | 2478 void RenderFrameHostImpl::NavigateToInterstitialURL(const GURL& data_url) { |
2477 DCHECK(data_url.SchemeIs(url::kDataScheme)); | 2479 DCHECK(data_url.SchemeIs(url::kDataScheme)); |
2478 CommonNavigationParams common_params( | 2480 CommonNavigationParams common_params( |
2479 data_url, Referrer(), ui::PAGE_TRANSITION_LINK, | 2481 data_url, Referrer(), ui::PAGE_TRANSITION_LINK, |
2480 FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT, false, false, | 2482 FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT, false, false, |
2481 base::TimeTicks::Now(), FrameMsg_UILoadMetricsReportType::NO_REPORT, | 2483 base::TimeTicks::Now(), FrameMsg_UILoadMetricsReportType::NO_REPORT, |
2482 GURL(), GURL(), PREVIEWS_OFF, base::TimeTicks::Now(), "GET", nullptr); | 2484 GURL(), GURL(), PREVIEWS_OFF, base::TimeTicks::Now(), "GET", nullptr); |
2483 if (IsBrowserSideNavigationEnabled()) { | 2485 if (IsBrowserSideNavigationEnabled()) { |
(...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3456 // There is no pending NavigationEntry in these cases, so pass 0 as the | 3458 // There is no pending NavigationEntry in these cases, so pass 0 as the |
3457 // pending_nav_entry_id. If the previous handle was a prematurely aborted | 3459 // pending_nav_entry_id. If the previous handle was a prematurely aborted |
3458 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. | 3460 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. |
3459 return NavigationHandleImpl::Create( | 3461 return NavigationHandleImpl::Create( |
3460 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, | 3462 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, |
3461 params.was_within_same_page, base::TimeTicks::Now(), | 3463 params.was_within_same_page, base::TimeTicks::Now(), |
3462 entry_id_for_data_nav, false); // started_from_context_menu | 3464 entry_id_for_data_nav, false); // started_from_context_menu |
3463 } | 3465 } |
3464 | 3466 |
3465 } // namespace content | 3467 } // namespace content |
OLD | NEW |