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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(), |
387 static_cast<NavigationControllerImpl*>(&controller())); | 387 static_cast<NavigationControllerImpl*>(&controller())); |
388 return manager->GetFrameHostForNavigation(*navigation_request); | 388 return manager->GetFrameHostForNavigation(*navigation_request, true); |
389 } | 389 } |
390 return manager->Navigate(entry); | 390 return manager->Navigate(entry); |
391 } | 391 } |
392 | 392 |
393 // Returns the pending RenderFrameHost. | 393 // Returns the pending RenderFrameHost. |
394 // PlzNavigate: returns the speculative RenderFrameHost. | 394 // PlzNavigate: returns the speculative RenderFrameHost. |
395 RenderFrameHostImpl* GetPendingFrameHost( | 395 RenderFrameHostImpl* GetPendingFrameHost( |
396 RenderFrameHostManager* manager) { | 396 RenderFrameHostManager* manager) { |
397 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 397 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
398 switches::kEnableBrowserSideNavigation)) { | 398 switches::kEnableBrowserSideNavigation)) { |
(...skipping 1509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1908 #if 0 | 1908 #if 0 |
1909 // 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. |
1910 // 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 |
1911 // cleaned up after detach. http://crbug.com/444955. | 1911 // cleaned up after detach. http://crbug.com/444955. |
1912 ASSERT_TRUE(site_instance->HasOneRef()) | 1912 ASSERT_TRUE(site_instance->HasOneRef()) |
1913 << "This SiteInstance should be destroyable now."; | 1913 << "This SiteInstance should be destroyable now."; |
1914 #endif | 1914 #endif |
1915 } | 1915 } |
1916 | 1916 |
1917 } // namespace content | 1917 } // namespace content |
OLD | NEW |