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_BROWSER_RENDERER_HOST_TEST_RENDER_VIEW_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_TEST_RENDER_VIEW_HOST_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_TEST_RENDER_VIEW_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_TEST_RENDER_VIEW_HOST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 virtual void AcceleratedSurfacePostSubBuffer( | 118 virtual void AcceleratedSurfacePostSubBuffer( |
119 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, | 119 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, |
120 int gpu_host_id) OVERRIDE; | 120 int gpu_host_id) OVERRIDE; |
121 virtual void AcceleratedSurfaceSuspend() OVERRIDE; | 121 virtual void AcceleratedSurfaceSuspend() OVERRIDE; |
122 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE; | 122 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE; |
123 #if defined(OS_MACOSX) | 123 #if defined(OS_MACOSX) |
124 virtual void AboutToWaitForBackingStoreMsg() OVERRIDE; | 124 virtual void AboutToWaitForBackingStoreMsg() OVERRIDE; |
125 virtual void PluginFocusChanged(bool focused, int plugin_id) OVERRIDE; | 125 virtual void PluginFocusChanged(bool focused, int plugin_id) OVERRIDE; |
126 virtual void StartPluginIme() OVERRIDE; | 126 virtual void StartPluginIme() OVERRIDE; |
127 virtual bool PostProcessEventForPluginIme( | 127 virtual bool PostProcessEventForPluginIme( |
128 const content::NativeWebKeyboardEvent& event) OVERRIDE; | 128 const NativeWebKeyboardEvent& event) OVERRIDE; |
129 virtual gfx::PluginWindowHandle AllocateFakePluginWindowHandle( | 129 virtual gfx::PluginWindowHandle AllocateFakePluginWindowHandle( |
130 bool opaque, | 130 bool opaque, |
131 bool root) OVERRIDE; | 131 bool root) OVERRIDE; |
132 virtual void DestroyFakePluginWindowHandle( | 132 virtual void DestroyFakePluginWindowHandle( |
133 gfx::PluginWindowHandle window) OVERRIDE; | 133 gfx::PluginWindowHandle window) OVERRIDE; |
134 virtual void AcceleratedSurfaceSetIOSurface(gfx::PluginWindowHandle window, | 134 virtual void AcceleratedSurfaceSetIOSurface(gfx::PluginWindowHandle window, |
135 int32 width, | 135 int32 width, |
136 int32 height, | 136 int32 height, |
137 uint64 surface_id) OVERRIDE; | 137 uint64 surface_id) OVERRIDE; |
138 virtual void AcceleratedSurfaceSetTransportDIB( | 138 virtual void AcceleratedSurfaceSetTransportDIB( |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 #endif | 193 #endif |
194 | 194 |
195 // TestRenderViewHost ---------------------------------------------------------- | 195 // TestRenderViewHost ---------------------------------------------------------- |
196 | 196 |
197 // TODO(brettw) this should use a TestWebContents which should be generalized | 197 // TODO(brettw) this should use a TestWebContents which should be generalized |
198 // from the WebContentsImpl test. We will probably also need that class' version | 198 // from the WebContentsImpl test. We will probably also need that class' version |
199 // of CreateRenderViewForRenderManager when more complicated tests start using | 199 // of CreateRenderViewForRenderManager when more complicated tests start using |
200 // this. | 200 // this. |
201 // | 201 // |
202 // Note that users outside of content must use this class by getting | 202 // Note that users outside of content must use this class by getting |
203 // the separate content::RenderViewHostTester interface via | 203 // the separate RenderViewHostTester interface via |
204 // RenderViewHostTester::For(rvh) on the RenderViewHost they want to | 204 // RenderViewHostTester::For(rvh) on the RenderViewHost they want to |
205 // drive tests on. | 205 // drive tests on. |
206 // | 206 // |
207 // Users within content may directly static_cast from a | 207 // Users within content may directly static_cast from a |
208 // RenderViewHost* to a TestRenderViewHost*. | 208 // RenderViewHost* to a TestRenderViewHost*. |
209 // | 209 // |
210 // The reasons we do it this way rather than extending the parallel | 210 // The reasons we do it this way rather than extending the parallel |
211 // inheritance hierarchy we have for RenderWidgetHost/RenderViewHost | 211 // inheritance hierarchy we have for RenderWidgetHost/RenderViewHost |
212 // vs. RenderWidgetHostImpl/RenderViewHostImpl are: | 212 // vs. RenderWidgetHostImpl/RenderViewHostImpl are: |
213 // | 213 // |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 std::string contents_mime_type_; | 325 std::string contents_mime_type_; |
326 | 326 |
327 DISALLOW_COPY_AND_ASSIGN(TestRenderViewHost); | 327 DISALLOW_COPY_AND_ASSIGN(TestRenderViewHost); |
328 }; | 328 }; |
329 | 329 |
330 #if defined(COMPILER_MSVC) | 330 #if defined(COMPILER_MSVC) |
331 #pragma warning(pop) | 331 #pragma warning(pop) |
332 #endif | 332 #endif |
333 | 333 |
334 // Adds methods to get straight at the impl classes. | 334 // Adds methods to get straight at the impl classes. |
335 class RenderViewHostImplTestHarness | 335 class RenderViewHostImplTestHarness : public RenderViewHostTestHarness { |
336 : public content::RenderViewHostTestHarness { | |
337 public: | 336 public: |
338 RenderViewHostImplTestHarness(); | 337 RenderViewHostImplTestHarness(); |
339 virtual ~RenderViewHostImplTestHarness(); | 338 virtual ~RenderViewHostImplTestHarness(); |
340 | 339 |
341 TestRenderViewHost* test_rvh(); | 340 TestRenderViewHost* test_rvh(); |
342 TestRenderViewHost* pending_test_rvh(); | 341 TestRenderViewHost* pending_test_rvh(); |
343 TestRenderViewHost* active_test_rvh(); | 342 TestRenderViewHost* active_test_rvh(); |
344 TestWebContents* contents(); | 343 TestWebContents* contents(); |
345 | 344 |
346 private: | 345 private: |
347 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImplTestHarness); | 346 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImplTestHarness); |
348 }; | 347 }; |
349 | 348 |
350 } // namespace content | 349 } // namespace content |
351 | 350 |
352 #endif // CONTENT_BROWSER_RENDERER_HOST_TEST_RENDER_VIEW_HOST_H_ | 351 #endif // CONTENT_BROWSER_RENDERER_HOST_TEST_RENDER_VIEW_HOST_H_ |
OLD | NEW |