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

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

Issue 701953006: PlzNavigate: Speculatively spawns a renderer process for navigations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replaced "renderer" to something more meaningful in comments. Created 5 years, 11 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
« no previous file with comments | « content/public/test/web_contents_tester.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 TestRenderFrameHost* TestWebContents::GetMainFrame() { 48 TestRenderFrameHost* TestWebContents::GetMainFrame() {
49 return static_cast<TestRenderFrameHost*>(WebContentsImpl::GetMainFrame()); 49 return static_cast<TestRenderFrameHost*>(WebContentsImpl::GetMainFrame());
50 } 50 }
51 51
52 TestRenderViewHost* TestWebContents::GetRenderViewHost() const { 52 TestRenderViewHost* TestWebContents::GetRenderViewHost() const {
53 return static_cast<TestRenderViewHost*>( 53 return static_cast<TestRenderViewHost*>(
54 WebContentsImpl::GetRenderViewHost()); 54 WebContentsImpl::GetRenderViewHost());
55 } 55 }
56 56
57 TestRenderFrameHost* TestWebContents::GetPendingMainFrame() const { 57 TestRenderFrameHost* TestWebContents::GetPendingMainFrame() const {
58 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
59 switches::kEnableBrowserSideNavigation)) {
60 return static_cast<TestRenderFrameHost*>(
61 GetRenderManager()->speculative_render_frame_host_.get());
62 }
58 return static_cast<TestRenderFrameHost*>( 63 return static_cast<TestRenderFrameHost*>(
59 GetRenderManager()->pending_frame_host()); 64 GetRenderManager()->pending_frame_host());
60 } 65 }
61 66
62 void TestWebContents::TestDidNavigate(RenderFrameHost* render_frame_host, 67 void TestWebContents::TestDidNavigate(RenderFrameHost* render_frame_host,
63 int page_id, 68 int page_id,
64 const GURL& url, 69 const GURL& url,
65 ui::PageTransition transition) { 70 ui::PageTransition transition) {
66 TestDidNavigateWithReferrer(render_frame_host, 71 TestDidNavigateWithReferrer(render_frame_host,
67 page_id, 72 page_id,
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 } 256 }
252 257
253 void TestWebContents::ShowCreatedWidget(int route_id, 258 void TestWebContents::ShowCreatedWidget(int route_id,
254 const gfx::Rect& initial_pos) { 259 const gfx::Rect& initial_pos) {
255 } 260 }
256 261
257 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { 262 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) {
258 } 263 }
259 264
260 } // namespace content 265 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/web_contents_tester.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698