| 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/test/test_render_frame_host.h" | 5 #include "content/test/test_render_frame_host.h" |
| 6 | 6 |
| 7 #include "content/browser/frame_host/frame_tree.h" | 7 #include "content/browser/frame_host/frame_tree.h" |
| 8 #include "content/browser/frame_host/navigation_handle_impl.h" | 8 #include "content/browser/frame_host/navigation_handle_impl.h" |
| 9 #include "content/browser/frame_host/navigation_request.h" | 9 #include "content/browser/frame_host/navigation_request.h" |
| 10 #include "content/browser/frame_host/navigator.h" | 10 #include "content/browser/frame_host/navigator.h" |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 } | 336 } |
| 337 | 337 |
| 338 void TestRenderFrameHost::SendRendererInitiatedNavigationRequest( | 338 void TestRenderFrameHost::SendRendererInitiatedNavigationRequest( |
| 339 const GURL& url, | 339 const GURL& url, |
| 340 bool has_user_gesture) { | 340 bool has_user_gesture) { |
| 341 // Since this is renderer-initiated navigation, the RenderFrame must be | 341 // Since this is renderer-initiated navigation, the RenderFrame must be |
| 342 // initialized. Do it if it hasn't happened yet. | 342 // initialized. Do it if it hasn't happened yet. |
| 343 InitializeRenderFrameIfNeeded(); | 343 InitializeRenderFrameIfNeeded(); |
| 344 | 344 |
| 345 if (IsBrowserSideNavigationEnabled()) { | 345 if (IsBrowserSideNavigationEnabled()) { |
| 346 BeginNavigationParams begin_params("GET", std::string(), net::LOAD_NORMAL, | 346 BeginNavigationParams begin_params(std::string(), net::LOAD_NORMAL, |
| 347 has_user_gesture, false, | 347 has_user_gesture, false, |
| 348 REQUEST_CONTEXT_TYPE_HYPERLINK); | 348 REQUEST_CONTEXT_TYPE_HYPERLINK); |
| 349 CommonNavigationParams common_params; | 349 CommonNavigationParams common_params; |
| 350 common_params.url = url; | 350 common_params.url = url; |
| 351 common_params.referrer = Referrer(GURL(), blink::WebReferrerPolicyDefault); | 351 common_params.referrer = Referrer(GURL(), blink::WebReferrerPolicyDefault); |
| 352 common_params.transition = ui::PAGE_TRANSITION_LINK; | 352 common_params.transition = ui::PAGE_TRANSITION_LINK; |
| 353 OnBeginNavigation(common_params, begin_params, | 353 OnBeginNavigation(common_params, begin_params, |
| 354 scoped_refptr<ResourceRequestBody>()); | 354 scoped_refptr<ResourceRequestBody>()); |
| 355 } | 355 } |
| 356 } | 356 } |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 // cleared during DidFailProvisionalLoad). | 413 // cleared during DidFailProvisionalLoad). |
| 414 int page_id = entry ? entry->GetPageID() : -1; | 414 int page_id = entry ? entry->GetPageID() : -1; |
| 415 if (page_id == -1) { | 415 if (page_id == -1) { |
| 416 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(delegate()); | 416 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(delegate()); |
| 417 page_id = web_contents->GetMaxPageIDForSiteInstance(GetSiteInstance()) + 1; | 417 page_id = web_contents->GetMaxPageIDForSiteInstance(GetSiteInstance()) + 1; |
| 418 } | 418 } |
| 419 return page_id; | 419 return page_id; |
| 420 } | 420 } |
| 421 | 421 |
| 422 } // namespace content | 422 } // namespace content |
| OLD | NEW |