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

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

Issue 628763003: Support InputRouter recycling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updates 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
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 RenderFrameHostImpl::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::WillForwardTouchEvents(RenderViewHost* rvh) {
70 RenderWidgetHostImpl* host_impl = RenderWidgetHostImpl::From(rvh); 70 RenderWidgetHostImpl* host_impl = RenderWidgetHostImpl::From(rvh);
71 return host_impl->has_touch_handler(); 71 return host_impl->ShouldForwardTouchEvent();
72 } 72 }
73 73
74 74
75 // RenderViewHostTestEnabler -------------------------------------------------- 75 // RenderViewHostTestEnabler --------------------------------------------------
76 76
77 RenderViewHostTestEnabler::RenderViewHostTestEnabler() 77 RenderViewHostTestEnabler::RenderViewHostTestEnabler()
78 : rph_factory_(new MockRenderProcessHostFactory()), 78 : rph_factory_(new MockRenderProcessHostFactory()),
79 rvh_factory_(new TestRenderViewHostFactory(rph_factory_.get())), 79 rvh_factory_(new TestRenderViewHostFactory(rph_factory_.get())),
80 rfh_factory_(new TestRenderFrameHostFactory()) {} 80 rfh_factory_(new TestRenderFrameHostFactory()) {}
81 81
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 BrowserContext* RenderViewHostTestHarness::CreateBrowserContext() { 227 BrowserContext* RenderViewHostTestHarness::CreateBrowserContext() {
228 return new TestBrowserContext(); 228 return new TestBrowserContext();
229 } 229 }
230 230
231 void RenderViewHostTestHarness::SetRenderProcessHostFactory( 231 void RenderViewHostTestHarness::SetRenderProcessHostFactory(
232 RenderProcessHostFactory* factory) { 232 RenderProcessHostFactory* factory) {
233 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory); 233 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory);
234 } 234 }
235 235
236 } // namespace content 236 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698