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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "base/test/histogram_tester.h" | 8 #include "base/test/histogram_tester.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "content/browser/frame_host/cross_site_transferring_request.h" | 10 #include "content/browser/frame_host/cross_site_transferring_request.h" |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 } | 374 } |
375 | 375 |
376 // Returns the RenderFrameHost that should be used in the navigation to | 376 // Returns the RenderFrameHost that should be used in the navigation to |
377 // |entry|. | 377 // |entry|. |
378 RenderFrameHostImpl* GetFrameHostForNavigation( | 378 RenderFrameHostImpl* GetFrameHostForNavigation( |
379 RenderFrameHostManager* manager, | 379 RenderFrameHostManager* manager, |
380 const NavigationEntryImpl& entry) { | 380 const NavigationEntryImpl& entry) { |
381 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 381 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
382 switches::kEnableBrowserSideNavigation)) { | 382 switches::kEnableBrowserSideNavigation)) { |
383 scoped_ptr<NavigationRequest> navigation_request = | 383 scoped_ptr<NavigationRequest> navigation_request = |
384 NavigationRequest::CreateBrowserInitiated( | 384 NavigationRequest::CreateBrowserInitiated( |
385 manager->frame_tree_node_, entry, FrameMsg_Navigate_Type::NORMAL, | 385 manager->frame_tree_node_, entry, FrameMsg_Navigate_Type::NORMAL, |
386 base::TimeTicks::Now()); | 386 base::TimeTicks::Now(), HistoryNavigationParams()); |
387 return manager->GetFrameHostForNavigation(*navigation_request); | 387 return manager->GetFrameHostForNavigation(*navigation_request); |
388 } | 388 } |
389 return manager->Navigate(entry); | 389 return manager->Navigate(entry); |
390 } | 390 } |
391 | 391 |
392 // Returns the pending RenderFrameHost. | 392 // Returns the pending RenderFrameHost. |
393 // PlzNavigate: returns the speculative RenderFrameHost. | 393 // PlzNavigate: returns the speculative RenderFrameHost. |
394 RenderFrameHostImpl* GetPendingFrameHost( | 394 RenderFrameHostImpl* GetPendingFrameHost( |
395 RenderFrameHostManager* manager) { | 395 RenderFrameHostManager* manager) { |
396 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 396 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
(...skipping 1510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1907 #if 0 | 1907 #if 0 |
1908 // TODO(nick): Currently a proxy to the removed frame lingers in the parent. | 1908 // TODO(nick): Currently a proxy to the removed frame lingers in the parent. |
1909 // Enable this assert below once the proxies to the subframe are correctly | 1909 // Enable this assert below once the proxies to the subframe are correctly |
1910 // cleaned up after detach. http://crbug.com/444955. | 1910 // cleaned up after detach. http://crbug.com/444955. |
1911 ASSERT_TRUE(site_instance->HasOneRef()) | 1911 ASSERT_TRUE(site_instance->HasOneRef()) |
1912 << "This SiteInstance should be destroyable now."; | 1912 << "This SiteInstance should be destroyable now."; |
1913 #endif | 1913 #endif |
1914 } | 1914 } |
1915 | 1915 |
1916 } // namespace content | 1916 } // namespace content |
OLD | NEW |