OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef WebLayerTreeViewTestCommon_h | |
6 #define WebLayerTreeViewTestCommon_h | |
7 | |
8 #include "CompositorFakeWebGraphicsContext3D.h" | |
9 #include "FakeWebCompositorOutputSurface.h" | |
10 #include <gmock/gmock.h> | |
11 #include <public/WebLayerTreeViewClient.h> | |
12 | |
13 namespace WebKit { | |
14 | |
15 class MockWebLayerTreeViewClient : public WebLayerTreeViewClient { | |
16 public: | |
17 MOCK_METHOD0(scheduleComposite, void()); | |
18 virtual void updateAnimations(double frameBeginTime) OVERRIDE { } | |
19 MOCK_METHOD0(willBeginFrame, void()); | |
20 MOCK_METHOD0(didBeginFrame, void()); | |
21 virtual void layout() OVERRIDE { } | |
22 virtual void applyScrollAndScale(const WebSize& scrollDelta, float scaleFact
or) OVERRIDE { } | |
23 | |
24 virtual WebCompositorOutputSurface* createOutputSurface() OVERRIDE | |
25 { | |
26 return FakeWebCompositorOutputSurface::create(CompositorFakeWebGraphicsC
ontext3D::create(WebGraphicsContext3D::Attributes())).leakPtr(); | |
27 } | |
28 virtual void didRecreateOutputSurface(bool) OVERRIDE { } | |
29 | |
30 MOCK_METHOD0(willCommit, void()); | |
31 MOCK_METHOD0(didCommit, void()); | |
32 virtual void didCommitAndDrawFrame() OVERRIDE { } | |
33 virtual void didCompleteSwapBuffers() OVERRIDE { } | |
34 }; | |
35 | |
36 } | |
37 | |
38 #endif // WebLayerTreeViewTestCommon_h | |
OLD | NEW |