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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 static bool HasTouchEventHandler(RenderViewHost* rvh); | 151 static bool HasTouchEventHandler(RenderViewHost* rvh); |
152 | 152 |
153 virtual ~RenderViewHostTester() {} | 153 virtual ~RenderViewHostTester() {} |
154 | 154 |
155 // Gives tests access to RenderViewHostImpl::CreateRenderView. | 155 // Gives tests access to RenderViewHostImpl::CreateRenderView. |
156 virtual bool CreateTestRenderView(const base::string16& frame_name, | 156 virtual bool CreateTestRenderView(const base::string16& frame_name, |
157 int opener_frame_route_id, | 157 int opener_frame_route_id, |
158 int proxy_routing_id, | 158 int proxy_routing_id, |
159 bool created_with_opener) = 0; | 159 bool created_with_opener) = 0; |
160 | 160 |
161 // Makes the WasHidden/WasShown calls to the RenderWidget that | |
162 // tell it it has been hidden or restored from having been hidden. | |
163 virtual void SimulateWasHidden() = 0; | |
164 virtual void SimulateWasShown() = 0; | |
165 | |
166 // Promote ComputeWebkitPrefs to public. | 161 // Promote ComputeWebkitPrefs to public. |
167 virtual WebPreferences TestComputeWebkitPrefs() = 0; | 162 virtual WebPreferences TestComputeWebkitPrefs() = 0; |
168 }; | 163 }; |
169 | 164 |
170 // You can instantiate only one class like this at a time. During its | 165 // You can instantiate only one class like this at a time. During its |
171 // lifetime, RenderViewHost and RenderFrameHost objects created may be used via | 166 // lifetime, RenderViewHost and RenderFrameHost objects created may be used via |
172 // RenderViewHostTester and RenderFrameHostTester respectively. | 167 // RenderViewHostTester and RenderFrameHostTester respectively. |
173 class RenderViewHostTestEnabler { | 168 class RenderViewHostTestEnabler { |
174 public: | 169 public: |
175 RenderViewHostTestEnabler(); | 170 RenderViewHostTestEnabler(); |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 #endif | 281 #endif |
287 std::unique_ptr<RenderViewHostTestEnabler> rvh_test_enabler_; | 282 std::unique_ptr<RenderViewHostTestEnabler> rvh_test_enabler_; |
288 RenderProcessHostFactory* factory_ = nullptr; | 283 RenderProcessHostFactory* factory_ = nullptr; |
289 | 284 |
290 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); | 285 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); |
291 }; | 286 }; |
292 | 287 |
293 } // namespace content | 288 } // namespace content |
294 | 289 |
295 #endif // CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_ | 290 #endif // CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_ |
OLD | NEW |