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

Side by Side Diff: content/public/test/test_renderer_host.cc

Issue 606113005: Move RenderViewHost swap out state to RenderFrameHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix review suggestions Created 6 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
« no previous file with comments | « content/public/test/test_renderer_host.h ('k') | content/test/test_render_frame_host.h » ('j') | 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/public/test/test_renderer_host.h" 5 #include "content/public/test/test_renderer_host.h"
6 6
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "content/browser/frame_host/navigation_entry_impl.h" 8 #include "content/browser/frame_host/navigation_entry_impl.h"
9 #include "content/browser/renderer_host/render_view_host_factory.h" 9 #include "content/browser/renderer_host/render_view_host_factory.h"
10 #include "content/browser/renderer_host/render_widget_host_impl.h" 10 #include "content/browser/renderer_host/render_widget_host_impl.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // static 48 // static
49 RenderViewHost* RenderViewHostTester::GetPendingForController( 49 RenderViewHost* RenderViewHostTester::GetPendingForController(
50 NavigationController* controller) { 50 NavigationController* controller) {
51 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>( 51 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(
52 controller->GetWebContents()); 52 controller->GetWebContents());
53 return web_contents->GetRenderManagerForTesting()->pending_render_view_host(); 53 return web_contents->GetRenderManagerForTesting()->pending_render_view_host();
54 } 54 }
55 55
56 // static 56 // static
57 bool RenderViewHostTester::IsRenderViewHostSwappedOut(RenderViewHost* rvh) { 57 bool RenderViewHostTester::IsRenderViewHostSwappedOut(RenderViewHost* rvh) {
58 return static_cast<RenderViewHostImpl*>(rvh)->rvh_state() == 58 return static_cast<RenderFrameHostImpl*>(rvh->GetMainFrame())->rfh_state() ==
59 RenderViewHostImpl::STATE_SWAPPED_OUT; 59 RenderFrameHostImpl::STATE_SWAPPED_OUT;
60 } 60 }
61 61
62 // static 62 // static
63 bool RenderViewHostTester::TestOnMessageReceived(RenderViewHost* rvh, 63 bool RenderViewHostTester::TestOnMessageReceived(RenderViewHost* rvh,
64 const IPC::Message& msg) { 64 const IPC::Message& msg) {
65 return static_cast<RenderViewHostImpl*>(rvh)->OnMessageReceived(msg); 65 return static_cast<RenderViewHostImpl*>(rvh)->OnMessageReceived(msg);
66 } 66 }
67 67
68 // static 68 // static
69 bool RenderViewHostTester::HasTouchEventHandler(RenderViewHost* rvh) { 69 bool RenderViewHostTester::HasTouchEventHandler(RenderViewHost* rvh) {
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 BrowserContext* RenderViewHostTestHarness::CreateBrowserContext() { 228 BrowserContext* RenderViewHostTestHarness::CreateBrowserContext() {
229 return new TestBrowserContext(); 229 return new TestBrowserContext();
230 } 230 }
231 231
232 void RenderViewHostTestHarness::SetRenderProcessHostFactory( 232 void RenderViewHostTestHarness::SetRenderProcessHostFactory(
233 RenderProcessHostFactory* factory) { 233 RenderProcessHostFactory* factory) {
234 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory); 234 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory);
235 } 235 }
236 236
237 } // namespace content 237 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/test_renderer_host.h ('k') | content/test/test_render_frame_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698