Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2682313002: Introduce NavigationSimulator to use in unit tests (Closed)
Patch Set: Removed impl split Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2456 matching lines...) Expand 10 before | Expand all | Expand 10 after
2467 // message will be received asynchronously from the UI of the browser. But the 2467 // message will be received asynchronously from the UI of the browser. But the
2468 // throbber needs to be kept in sync with what's happening in the UI. For 2468 // throbber needs to be kept in sync with what's happening in the UI. For
2469 // example, the throbber will start immediately when the user navigates even 2469 // example, the throbber will start immediately when the user navigates even
2470 // if the renderer is delayed. There is also an issue with the throbber 2470 // if the renderer is delayed. There is also an issue with the throbber
2471 // starting because the WebUI (which controls whether the favicon is 2471 // starting because the WebUI (which controls whether the favicon is
2472 // displayed) happens synchronously. If the start loading messages was 2472 // displayed) happens synchronously. If the start loading messages was
2473 // asynchronous, then the default favicon would flash in. 2473 // asynchronous, then the default favicon would flash in.
2474 // 2474 //
2475 // Blink doesn't send throb notifications for JavaScript URLs, so it is not 2475 // Blink doesn't send throb notifications for JavaScript URLs, so it is not
2476 // done here either. 2476 // done here either.
2477 if (!common_params.url.SchemeIs(url::kJavaScriptScheme)) 2477 if (!common_params.url.SchemeIs(url::kJavaScriptScheme) &&
2478 (!navigation_handle_ || !navigation_handle_->is_transferring())) {
2478 OnDidStartLoading(true); 2479 OnDidStartLoading(true);
2480 }
2479 } 2481 }
2480 2482
2481 void RenderFrameHostImpl::NavigateToInterstitialURL(const GURL& data_url) { 2483 void RenderFrameHostImpl::NavigateToInterstitialURL(const GURL& data_url) {
2482 DCHECK(data_url.SchemeIs(url::kDataScheme)); 2484 DCHECK(data_url.SchemeIs(url::kDataScheme));
2483 CommonNavigationParams common_params( 2485 CommonNavigationParams common_params(
2484 data_url, Referrer(), ui::PAGE_TRANSITION_LINK, 2486 data_url, Referrer(), ui::PAGE_TRANSITION_LINK,
2485 FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT, false, false, 2487 FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT, false, false,
2486 base::TimeTicks::Now(), FrameMsg_UILoadMetricsReportType::NO_REPORT, 2488 base::TimeTicks::Now(), FrameMsg_UILoadMetricsReportType::NO_REPORT,
2487 GURL(), GURL(), PREVIEWS_OFF, base::TimeTicks::Now(), "GET", nullptr); 2489 GURL(), GURL(), PREVIEWS_OFF, base::TimeTicks::Now(), "GET", nullptr);
2488 if (IsBrowserSideNavigationEnabled()) { 2490 if (IsBrowserSideNavigationEnabled()) {
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
3459 // There is no pending NavigationEntry in these cases, so pass 0 as the 3461 // There is no pending NavigationEntry in these cases, so pass 0 as the
3460 // pending_nav_entry_id. If the previous handle was a prematurely aborted 3462 // pending_nav_entry_id. If the previous handle was a prematurely aborted
3461 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. 3463 // navigation loaded via LoadDataWithBaseURL, propagate the entry id.
3462 return NavigationHandleImpl::Create( 3464 return NavigationHandleImpl::Create(
3463 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, 3465 params.url, params.redirects, frame_tree_node_, is_renderer_initiated,
3464 params.was_within_same_page, base::TimeTicks::Now(), 3466 params.was_within_same_page, base::TimeTicks::Now(),
3465 entry_id_for_data_nav, false); // started_from_context_menu 3467 entry_id_for_data_nav, false); // started_from_context_menu
3466 } 3468 }
3467 3469
3468 } // namespace content 3470 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698