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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(), HistoryNavigationParams()); | 386 base::TimeTicks::Now(), |
| 387 static_cast<NavigationControllerImpl*>(&controller())); |
387 return manager->GetFrameHostForNavigation(*navigation_request); | 388 return manager->GetFrameHostForNavigation(*navigation_request); |
388 } | 389 } |
389 return manager->Navigate(entry); | 390 return manager->Navigate(entry); |
390 } | 391 } |
391 | 392 |
392 // Returns the pending RenderFrameHost. | 393 // Returns the pending RenderFrameHost. |
393 // PlzNavigate: returns the speculative RenderFrameHost. | 394 // PlzNavigate: returns the speculative RenderFrameHost. |
394 RenderFrameHostImpl* GetPendingFrameHost( | 395 RenderFrameHostImpl* GetPendingFrameHost( |
395 RenderFrameHostManager* manager) { | 396 RenderFrameHostManager* manager) { |
396 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 397 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
(...skipping 1510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1907 #if 0 | 1908 #if 0 |
1908 // TODO(nick): Currently a proxy to the removed frame lingers in the parent. | 1909 // 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 | 1910 // Enable this assert below once the proxies to the subframe are correctly |
1910 // cleaned up after detach. http://crbug.com/444955. | 1911 // cleaned up after detach. http://crbug.com/444955. |
1911 ASSERT_TRUE(site_instance->HasOneRef()) | 1912 ASSERT_TRUE(site_instance->HasOneRef()) |
1912 << "This SiteInstance should be destroyable now."; | 1913 << "This SiteInstance should be destroyable now."; |
1913 #endif | 1914 #endif |
1914 } | 1915 } |
1915 | 1916 |
1916 } // namespace content | 1917 } // namespace content |
OLD | NEW |