OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 WebLayerTreeViewTestCommon_h | 5 #ifndef WebLayerTreeViewTestCommon_h |
6 #define WebLayerTreeViewTestCommon_h | 6 #define WebLayerTreeViewTestCommon_h |
7 | 7 |
8 #include "cc/test/compositor_fake_web_graphics_context_3d.h" | 8 #include "cc/test/compositor_fake_web_graphics_context_3d.h" |
9 #include "cc/test/fake_web_compositor_output_surface.h" | 9 #include "cc/test/fake_output_surface.h" |
10 #include <gmock/gmock.h> | 10 #include <gmock/gmock.h> |
11 #include <public/WebLayerTreeViewClient.h> | 11 #include <public/WebLayerTreeViewClient.h> |
12 | 12 |
13 namespace WebKit { | 13 namespace WebKit { |
14 | 14 |
15 class MockWebLayerTreeViewClient : public WebLayerTreeViewClient { | 15 class MockWebLayerTreeViewClient : public WebLayerTreeViewClient { |
16 public: | 16 public: |
17 MOCK_METHOD0(scheduleComposite, void()); | 17 MOCK_METHOD0(scheduleComposite, void()); |
18 virtual void updateAnimations(double frameBeginTime) OVERRIDE { } | 18 virtual void updateAnimations(double frameBeginTime) OVERRIDE { } |
19 MOCK_METHOD0(willBeginFrame, void()); | 19 MOCK_METHOD0(willBeginFrame, void()); |
20 MOCK_METHOD0(didBeginFrame, void()); | 20 MOCK_METHOD0(didBeginFrame, void()); |
21 virtual void layout() OVERRIDE { } | 21 virtual void layout() OVERRIDE { } |
22 virtual void applyScrollAndScale(const WebSize& scrollDelta, float scaleFact
or) OVERRIDE { } | 22 virtual void applyScrollAndScale(const WebSize& scrollDelta, float scaleFact
or) OVERRIDE { } |
23 | 23 |
24 virtual WebCompositorOutputSurface* createOutputSurface() OVERRIDE | 24 virtual cc::OutputSurface* createOutputSurface() OVERRIDE |
25 { | 25 { |
26 return FakeWebCompositorOutputSurface::create(CompositorFakeWebGraphicsC
ontext3D::create(WebGraphicsContext3D::Attributes()).PassAs<WebKit::WebGraphicsC
ontext3D>()).release(); | 26 return cc::FakeOutputSurface::Create3d(CompositorFakeWebGraphicsContext3D:
:create(WebGraphicsContext3D::Attributes()).PassAs<WebKit::WebGraphicsContext3D>
()).release(); |
27 } | 27 } |
28 virtual void didRecreateOutputSurface(bool) OVERRIDE { } | 28 virtual void didRecreateOutputSurface(bool) OVERRIDE { } |
29 | 29 |
30 MOCK_METHOD0(willCommit, void()); | 30 MOCK_METHOD0(willCommit, void()); |
31 MOCK_METHOD0(didCommit, void()); | 31 MOCK_METHOD0(didCommit, void()); |
32 virtual void didCommitAndDrawFrame() OVERRIDE { } | 32 virtual void didCommitAndDrawFrame() OVERRIDE { } |
33 virtual void didCompleteSwapBuffers() OVERRIDE { } | 33 virtual void didCompleteSwapBuffers() OVERRIDE { } |
34 }; | 34 }; |
35 | 35 |
36 } | 36 } |
37 | 37 |
38 #endif // WebLayerTreeViewTestCommon_h | 38 #endif // WebLayerTreeViewTestCommon_h |
OLD | NEW |