Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(466)

Side by Side Diff: content/test/test_render_frame_host.cc

Issue 1294243004: PlzNavigate: Make ServiceWorker work with PlzNavigate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missed a spot. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 322
323 void TestRenderFrameHost::SendRendererInitiatedNavigationRequest( 323 void TestRenderFrameHost::SendRendererInitiatedNavigationRequest(
324 const GURL& url, 324 const GURL& url,
325 bool has_user_gesture) { 325 bool has_user_gesture) {
326 // Since this is renderer-initiated navigation, the RenderFrame must be 326 // Since this is renderer-initiated navigation, the RenderFrame must be
327 // initialized. Do it if it hasn't happened yet. 327 // initialized. Do it if it hasn't happened yet.
328 InitializeRenderFrameIfNeeded(); 328 InitializeRenderFrameIfNeeded();
329 329
330 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 330 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
331 switches::kEnableBrowserSideNavigation)) { 331 switches::kEnableBrowserSideNavigation)) {
332 BeginNavigationParams begin_params("GET", std::string(), net::LOAD_NORMAL, 332 BeginNavigationParams begin_params(
333 has_user_gesture); 333 "GET", std::string(), net::LOAD_NORMAL, has_user_gesture, false,
334 REQUEST_CONTEXT_TYPE_HYPERLINK);
334 CommonNavigationParams common_params; 335 CommonNavigationParams common_params;
335 common_params.url = url; 336 common_params.url = url;
336 common_params.referrer = Referrer(GURL(), blink::WebReferrerPolicyDefault); 337 common_params.referrer = Referrer(GURL(), blink::WebReferrerPolicyDefault);
337 common_params.transition = ui::PAGE_TRANSITION_LINK; 338 common_params.transition = ui::PAGE_TRANSITION_LINK;
338 OnBeginNavigation(common_params, begin_params, 339 OnBeginNavigation(common_params, begin_params,
339 scoped_refptr<ResourceRequestBody>()); 340 scoped_refptr<ResourceRequestBody>());
340 } 341 }
341 } 342 }
342 343
343 void TestRenderFrameHost::DidChangeOpener(int opener_routing_id) { 344 void TestRenderFrameHost::DidChangeOpener(int opener_routing_id) {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 // cleared during DidFailProvisionalLoad). 394 // cleared during DidFailProvisionalLoad).
394 int page_id = entry ? entry->GetPageID() : -1; 395 int page_id = entry ? entry->GetPageID() : -1;
395 if (page_id == -1) { 396 if (page_id == -1) {
396 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(delegate()); 397 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(delegate());
397 page_id = web_contents->GetMaxPageIDForSiteInstance(GetSiteInstance()) + 1; 398 page_id = web_contents->GetMaxPageIDForSiteInstance(GetSiteInstance()) + 1;
398 } 399 }
399 return page_id; 400 return page_id;
400 } 401 }
401 402
402 } // namespace content 403 } // namespace content
OLDNEW
« content/renderer/render_frame_impl.cc ('K') | « content/renderer/render_frame_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698