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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "content/browser/frame_host/frame_tree.h" | 8 #include "content/browser/frame_host/frame_tree.h" |
9 #include "content/browser/frame_host/navigation_handle_impl.h" | 9 #include "content/browser/frame_host/navigation_handle_impl.h" |
10 #include "content/browser/frame_host/navigation_request.h" | 10 #include "content/browser/frame_host/navigation_request.h" |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
321 | 321 |
322 void TestRenderFrameHost::SendRendererInitiatedNavigationRequest( | 322 void TestRenderFrameHost::SendRendererInitiatedNavigationRequest( |
323 const GURL& url, | 323 const GURL& url, |
324 bool has_user_gesture) { | 324 bool has_user_gesture) { |
325 // Since this is renderer-initiated navigation, the RenderFrame must be | 325 // Since this is renderer-initiated navigation, the RenderFrame must be |
326 // initialized. Do it if it hasn't happened yet. | 326 // initialized. Do it if it hasn't happened yet. |
327 InitializeRenderFrameIfNeeded(); | 327 InitializeRenderFrameIfNeeded(); |
328 | 328 |
329 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 329 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
330 switches::kEnableBrowserSideNavigation)) { | 330 switches::kEnableBrowserSideNavigation)) { |
331 BeginNavigationParams begin_params("GET", std::string(), net::LOAD_NORMAL, | 331 BeginNavigationParams begin_params( |
332 has_user_gesture); | 332 "GET", std::string(), net::LOAD_NORMAL, has_user_gesture, false, |
333 REQUEST_CONTEXT_TYPE_LOCATION); | |
clamy
2015/08/31 12:09:27
Regarding the type, 3 lines below we set the trans
Fabrice (no longer in Chrome)
2015/08/31 14:00:35
Done.
| |
333 CommonNavigationParams common_params; | 334 CommonNavigationParams common_params; |
334 common_params.url = url; | 335 common_params.url = url; |
335 common_params.referrer = Referrer(GURL(), blink::WebReferrerPolicyDefault); | 336 common_params.referrer = Referrer(GURL(), blink::WebReferrerPolicyDefault); |
336 common_params.transition = ui::PAGE_TRANSITION_LINK; | 337 common_params.transition = ui::PAGE_TRANSITION_LINK; |
337 OnBeginNavigation(common_params, begin_params, | 338 OnBeginNavigation(common_params, begin_params, |
338 scoped_refptr<ResourceRequestBody>()); | 339 scoped_refptr<ResourceRequestBody>()); |
339 } | 340 } |
340 } | 341 } |
341 | 342 |
342 void TestRenderFrameHost::DidChangeOpener(int opener_routing_id) { | 343 void TestRenderFrameHost::DidChangeOpener(int opener_routing_id) { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
392 // cleared during DidFailProvisionalLoad). | 393 // cleared during DidFailProvisionalLoad). |
393 int page_id = entry ? entry->GetPageID() : -1; | 394 int page_id = entry ? entry->GetPageID() : -1; |
394 if (page_id == -1) { | 395 if (page_id == -1) { |
395 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(delegate()); | 396 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(delegate()); |
396 page_id = web_contents->GetMaxPageIDForSiteInstance(GetSiteInstance()) + 1; | 397 page_id = web_contents->GetMaxPageIDForSiteInstance(GetSiteInstance()) + 1; |
397 } | 398 } |
398 return page_id; | 399 return page_id; |
399 } | 400 } |
400 | 401 |
401 } // namespace content | 402 } // namespace content |
OLD | NEW |