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

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

Issue 1048463004: PlzNavigate: track pending commits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed DCHECK + rebase Created 5 years, 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_web_contents.h" 5 #include "content/test/test_web_contents.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "content/browser/browser_url_handler_impl.h" 10 #include "content/browser/browser_url_handler_impl.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 params.gesture = NavigationGestureUser; 96 params.gesture = NavigationGestureUser;
97 params.was_within_same_page = false; 97 params.was_within_same_page = false;
98 params.is_post = false; 98 params.is_post = false;
99 params.page_state = PageState::CreateFromURL(url); 99 params.page_state = PageState::CreateFromURL(url);
100 100
101 RenderFrameHostImpl* rfhi = 101 RenderFrameHostImpl* rfhi =
102 static_cast<RenderFrameHostImpl*>(render_frame_host); 102 static_cast<RenderFrameHostImpl*>(render_frame_host);
103 rfhi->frame_tree_node()->navigator()->DidNavigate(rfhi, params); 103 rfhi->frame_tree_node()->navigator()->DidNavigate(rfhi, params);
104 } 104 }
105 105
106 bool TestWebContents::CrossNavigationPending() {
107 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
108 switches::kEnableBrowserSideNavigation)) {
109 return GetRenderManager()->speculative_render_frame_host_ &&
110 static_cast<TestRenderFrameHost*>(
111 GetRenderManager()->speculative_render_frame_host_.get())
112 ->pending_commit();
113 }
114 return GetRenderManager()->cross_navigation_pending_;
115 }
116
106 bool TestWebContents::CreateRenderViewForRenderManager( 117 bool TestWebContents::CreateRenderViewForRenderManager(
107 RenderViewHost* render_view_host, 118 RenderViewHost* render_view_host,
108 int opener_route_id, 119 int opener_route_id,
109 int proxy_routing_id, 120 int proxy_routing_id,
110 bool for_main_frame) { 121 bool for_main_frame) {
111 UpdateMaxPageIDIfNecessary(render_view_host); 122 UpdateMaxPageIDIfNecessary(render_view_host);
112 // This will go to a TestRenderViewHost. 123 // This will go to a TestRenderViewHost.
113 static_cast<RenderViewHostImpl*>( 124 static_cast<RenderViewHostImpl*>(
114 render_view_host)->CreateRenderView(base::string16(), 125 render_view_host)->CreateRenderView(base::string16(),
115 opener_route_id, 126 opener_route_id,
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 } 269 }
259 270
260 void TestWebContents::ShowCreatedWidget(int route_id, 271 void TestWebContents::ShowCreatedWidget(int route_id,
261 const gfx::Rect& initial_rect) { 272 const gfx::Rect& initial_rect) {
262 } 273 }
263 274
264 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { 275 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) {
265 } 276 }
266 277
267 } // namespace content 278 } // namespace content
OLDNEW
« content/test/test_web_contents.h ('K') | « content/test/test_web_contents.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698