| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 ANDROID_WEBVIEW_BROWSER_TEST_RENDERING_TEST_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_TEST_RENDERING_TEST_H_ |
| 6 #define ANDROID_WEBVIEW_BROWSER_TEST_RENDERING_TEST_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_TEST_RENDERING_TEST_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "android_webview/browser/browser_view_renderer_client.h" | 10 #include "android_webview/browser/browser_view_renderer_client.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 namespace cc { | 22 namespace cc { |
| 23 class CompositorFrame; | 23 class CompositorFrame; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace content { | 26 namespace content { |
| 27 class SynchronousCompositor; | 27 class SynchronousCompositor; |
| 28 class TestSynchronousCompositor; | 28 class TestSynchronousCompositor; |
| 29 } | 29 } |
| 30 | 30 |
| 31 namespace ui { |
| 32 class TouchHandleDrawable; |
| 33 } |
| 34 |
| 31 namespace android_webview { | 35 namespace android_webview { |
| 32 | 36 |
| 33 class BrowserViewRenderer; | 37 class BrowserViewRenderer; |
| 34 class CompositorFrameConsumer; | 38 class CompositorFrameConsumer; |
| 35 class CompositorFrameProducer; | 39 class CompositorFrameProducer; |
| 36 class FakeWindow; | 40 class FakeWindow; |
| 37 class RenderThreadManager; | 41 class RenderThreadManager; |
| 38 struct ParentCompositorDrawConstraints; | 42 struct ParentCompositorDrawConstraints; |
| 39 | 43 |
| 40 class RenderingTest : public testing::Test, | 44 class RenderingTest : public testing::Test, |
| 41 public BrowserViewRendererClient, | 45 public BrowserViewRendererClient, |
| 42 public WindowHooks { | 46 public WindowHooks { |
| 43 public: | 47 public: |
| 44 // BrowserViewRendererClient overrides. | 48 // BrowserViewRendererClient overrides. |
| 45 void OnNewPicture() override; | 49 void OnNewPicture() override; |
| 46 void PostInvalidate() override; | 50 void PostInvalidate() override; |
| 47 gfx::Point GetLocationOnScreen() override; | 51 gfx::Point GetLocationOnScreen() override; |
| 48 void ScrollContainerViewTo(const gfx::Vector2d& new_value) override {} | 52 void ScrollContainerViewTo(const gfx::Vector2d& new_value) override {} |
| 49 void UpdateScrollState(const gfx::Vector2d& max_scroll_offset, | 53 void UpdateScrollState(const gfx::Vector2d& max_scroll_offset, |
| 50 const gfx::SizeF& contents_size_dip, | 54 const gfx::SizeF& contents_size_dip, |
| 51 float page_scale_factor, | 55 float page_scale_factor, |
| 52 float min_page_scale_factor, | 56 float min_page_scale_factor, |
| 53 float max_page_scale_factor) override {} | 57 float max_page_scale_factor) override {} |
| 54 void DidOverscroll(const gfx::Vector2d& overscroll_delta, | 58 void DidOverscroll(const gfx::Vector2d& overscroll_delta, |
| 55 const gfx::Vector2dF& overscroll_velocity) override {} | 59 const gfx::Vector2dF& overscroll_velocity) override {} |
| 60 ui::TouchHandleDrawable* CreateDrawable() override; |
| 56 | 61 |
| 57 // WindowHooks overrides. | 62 // WindowHooks overrides. |
| 58 void WillOnDraw() override; | 63 void WillOnDraw() override; |
| 59 void DidOnDraw(bool success) override {} | 64 void DidOnDraw(bool success) override {} |
| 60 FakeFunctor* GetFunctor() override; | 65 FakeFunctor* GetFunctor() override; |
| 61 void WillSyncOnRT() override {} | 66 void WillSyncOnRT() override {} |
| 62 void DidSyncOnRT() override {} | 67 void DidSyncOnRT() override {} |
| 63 void WillProcessOnRT() override {} | 68 void WillProcessOnRT() override {} |
| 64 void DidProcessOnRT() override {} | 69 void DidProcessOnRT() override {} |
| 65 bool WillDrawOnRT(AwDrawGLInfo* draw_info) override; | 70 bool WillDrawOnRT(AwDrawGLInfo* draw_info) override; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 DISALLOW_COPY_AND_ASSIGN(RenderingTest); | 106 DISALLOW_COPY_AND_ASSIGN(RenderingTest); |
| 102 }; | 107 }; |
| 103 | 108 |
| 104 #define RENDERING_TEST_F(TEST_FIXTURE_NAME) \ | 109 #define RENDERING_TEST_F(TEST_FIXTURE_NAME) \ |
| 105 TEST_F(TEST_FIXTURE_NAME, RunTest) { RunTest(); } \ | 110 TEST_F(TEST_FIXTURE_NAME, RunTest) { RunTest(); } \ |
| 106 class NeedsSemicolon##TEST_FIXTURE_NAME {} | 111 class NeedsSemicolon##TEST_FIXTURE_NAME {} |
| 107 | 112 |
| 108 } // namespace android_webview | 113 } // namespace android_webview |
| 109 | 114 |
| 110 #endif // ANDROID_WEBVIEW_BROWSER_TEST_RENDERING_TEST_H_ | 115 #endif // ANDROID_WEBVIEW_BROWSER_TEST_RENDERING_TEST_H_ |
| OLD | NEW |