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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 virtual void SetTakesFocusOnlyOnMouseDown(bool flag) OVERRIDE {} | 66 virtual void SetTakesFocusOnlyOnMouseDown(bool flag) OVERRIDE {} |
67 virtual void SetWindowVisibility(bool visible) OVERRIDE {} | 67 virtual void SetWindowVisibility(bool visible) OVERRIDE {} |
68 virtual void WindowFrameChanged() OVERRIDE {} | 68 virtual void WindowFrameChanged() OVERRIDE {} |
69 #endif // defined(OS_MACOSX) | 69 #endif // defined(OS_MACOSX) |
70 #if defined(TOOLKIT_USES_GTK) | 70 #if defined(TOOLKIT_USES_GTK) |
71 virtual GdkEventButton* GetLastMouseDown() OVERRIDE; | 71 virtual GdkEventButton* GetLastMouseDown() OVERRIDE; |
72 #if !defined(TOOLKIT_VIEWS) | 72 #if !defined(TOOLKIT_VIEWS) |
73 virtual gfx::NativeView BuildInputMethodsGtkMenu() OVERRIDE; | 73 virtual gfx::NativeView BuildInputMethodsGtkMenu() OVERRIDE; |
74 #endif // !defined(TOOLKIT_VIEWS) | 74 #endif // !defined(TOOLKIT_VIEWS) |
75 #endif // defined(TOOLKIT_USES_GTK) | 75 #endif // defined(TOOLKIT_USES_GTK) |
76 virtual void UnhandledWheelEvent( | |
77 const WebKit::WebMouseWheelEvent& event) OVERRIDE {} | |
78 virtual bool CopyFromCompositingSurface( | 76 virtual bool CopyFromCompositingSurface( |
79 const gfx::Size& size, | 77 const gfx::Size& size, |
80 skia::PlatformCanvas* output) OVERRIDE; | 78 skia::PlatformCanvas* output) OVERRIDE; |
81 | 79 |
82 // RenderWidgetHostViewPort implementation. | 80 // RenderWidgetHostViewPort implementation. |
83 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view, | 81 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view, |
84 const gfx::Rect& pos) OVERRIDE {} | 82 const gfx::Rect& pos) OVERRIDE {} |
85 virtual void InitAsFullscreen( | 83 virtual void InitAsFullscreen( |
86 RenderWidgetHostView* reference_host_view) OVERRIDE {} | 84 RenderWidgetHostView* reference_host_view) OVERRIDE {} |
87 virtual void DidBecomeSelected() OVERRIDE {} | 85 virtual void DidBecomeSelected() OVERRIDE {} |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 // is not specified since it is synonymous with the one from | 223 // is not specified since it is synonymous with the one from |
226 // RenderViewHostImpl, see below. | 224 // RenderViewHostImpl, see below. |
227 virtual void SendNavigate(int page_id, const GURL& url) OVERRIDE; | 225 virtual void SendNavigate(int page_id, const GURL& url) OVERRIDE; |
228 virtual void SendNavigateWithTransition(int page_id, const GURL& url, | 226 virtual void SendNavigateWithTransition(int page_id, const GURL& url, |
229 PageTransition transition) OVERRIDE; | 227 PageTransition transition) OVERRIDE; |
230 virtual void SendShouldCloseACK(bool proceed) OVERRIDE; | 228 virtual void SendShouldCloseACK(bool proceed) OVERRIDE; |
231 virtual void SetContentsMimeType(const std::string& mime_type) OVERRIDE; | 229 virtual void SetContentsMimeType(const std::string& mime_type) OVERRIDE; |
232 virtual void SimulateSwapOutACK() OVERRIDE; | 230 virtual void SimulateSwapOutACK() OVERRIDE; |
233 virtual void SimulateWasHidden() OVERRIDE; | 231 virtual void SimulateWasHidden() OVERRIDE; |
234 virtual void SimulateWasRestored() OVERRIDE; | 232 virtual void SimulateWasRestored() OVERRIDE; |
235 virtual bool TestOnMessageReceived(const IPC::Message& msg) OVERRIDE; | |
236 | 233 |
237 void TestOnMsgStartDragging(const WebDropData& drop_data); | 234 void TestOnMsgStartDragging(const WebDropData& drop_data); |
238 | 235 |
239 // If set, *delete_counter is incremented when this object destructs. | 236 // If set, *delete_counter is incremented when this object destructs. |
240 void set_delete_counter(int* delete_counter) { | 237 void set_delete_counter(int* delete_counter) { |
241 delete_counter_ = delete_counter; | 238 delete_counter_ = delete_counter; |
242 } | 239 } |
243 | 240 |
244 // Sets whether the RenderView currently exists or not. This controls the | 241 // Sets whether the RenderView currently exists or not. This controls the |
245 // return value from IsRenderViewLive, which the rest of the system uses to | 242 // return value from IsRenderViewLive, which the rest of the system uses to |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 std::string contents_mime_type_; | 291 std::string contents_mime_type_; |
295 | 292 |
296 DISALLOW_COPY_AND_ASSIGN(TestRenderViewHost); | 293 DISALLOW_COPY_AND_ASSIGN(TestRenderViewHost); |
297 }; | 294 }; |
298 | 295 |
299 #if defined(COMPILER_MSVC) | 296 #if defined(COMPILER_MSVC) |
300 #pragma warning(pop) | 297 #pragma warning(pop) |
301 #endif | 298 #endif |
302 | 299 |
303 // Adds methods to get straight at the impl classes. | 300 // Adds methods to get straight at the impl classes. |
304 class RenderViewHostImplTestHarness : public RenderViewHostTestHarness { | 301 class RenderViewHostImplTestHarness |
| 302 : public content::RenderViewHostTestHarness { |
305 public: | 303 public: |
306 RenderViewHostImplTestHarness(); | 304 RenderViewHostImplTestHarness(); |
307 virtual ~RenderViewHostImplTestHarness(); | 305 virtual ~RenderViewHostImplTestHarness(); |
308 | 306 |
309 TestRenderViewHost* test_rvh(); | 307 TestRenderViewHost* test_rvh(); |
310 TestRenderViewHost* pending_test_rvh(); | 308 TestRenderViewHost* pending_test_rvh(); |
311 TestRenderViewHost* active_test_rvh(); | 309 TestRenderViewHost* active_test_rvh(); |
312 TestTabContents* contents(); | 310 TestTabContents* contents(); |
313 | 311 |
314 private: | 312 private: |
315 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImplTestHarness); | 313 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImplTestHarness); |
316 }; | 314 }; |
317 | 315 |
318 } // namespace content | 316 } // namespace content |
319 | 317 |
320 #endif // CONTENT_BROWSER_RENDERER_HOST_TEST_RENDER_VIEW_HOST_H_ | 318 #endif // CONTENT_BROWSER_RENDERER_HOST_TEST_RENDER_VIEW_HOST_H_ |
OLD | NEW |