| OLD | NEW |
| 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 #ifndef CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_ |
| 6 #define CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_ | 6 #define CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "content/public/browser/render_frame_host.h" | 10 #include "content/public/browser/render_frame_host.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // | 102 // |
| 103 // This is safe to call on any RenderViewHost, not just ones | 103 // This is safe to call on any RenderViewHost, not just ones |
| 104 // constructed while a RenderViewHostTestEnabler is in play. | 104 // constructed while a RenderViewHostTestEnabler is in play. |
| 105 static bool IsRenderViewHostSwappedOut(RenderViewHost* rvh); | 105 static bool IsRenderViewHostSwappedOut(RenderViewHost* rvh); |
| 106 | 106 |
| 107 // Calls the RenderViewHosts' private OnMessageReceived function with the | 107 // Calls the RenderViewHosts' private OnMessageReceived function with the |
| 108 // given message. | 108 // given message. |
| 109 static bool TestOnMessageReceived(RenderViewHost* rvh, | 109 static bool TestOnMessageReceived(RenderViewHost* rvh, |
| 110 const IPC::Message& msg); | 110 const IPC::Message& msg); |
| 111 | 111 |
| 112 // Returns whether the underlying web-page has any touch-event handlers. | 112 // Returns whether the underlying view is forwarding touch events to the |
| 113 static bool HasTouchEventHandler(RenderViewHost* rvh); | 113 // web page. |
| 114 static bool WillForwardTouchEvents(RenderViewHost* rvh); |
| 114 | 115 |
| 115 virtual ~RenderViewHostTester() {} | 116 virtual ~RenderViewHostTester() {} |
| 116 | 117 |
| 117 // Gives tests access to RenderViewHostImpl::CreateRenderView. | 118 // Gives tests access to RenderViewHostImpl::CreateRenderView. |
| 118 virtual bool CreateRenderView(const base::string16& frame_name, | 119 virtual bool CreateRenderView(const base::string16& frame_name, |
| 119 int opener_route_id, | 120 int opener_route_id, |
| 120 int proxy_routing_id, | 121 int proxy_routing_id, |
| 121 int32 max_page_id, | 122 int32 max_page_id, |
| 122 bool created_with_opener) = 0; | 123 bool created_with_opener) = 0; |
| 123 | 124 |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 | 240 |
| 240 int thread_bundle_options_; | 241 int thread_bundle_options_; |
| 241 scoped_ptr<TestBrowserThreadBundle> thread_bundle_; | 242 scoped_ptr<TestBrowserThreadBundle> thread_bundle_; |
| 242 | 243 |
| 243 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); | 244 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); |
| 244 }; | 245 }; |
| 245 | 246 |
| 246 } // namespace content | 247 } // namespace content |
| 247 | 248 |
| 248 #endif // CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_ | 249 #endif // CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_ |
| OLD | NEW |