OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 CC_TEST_MOCK_COMPOSITOR_FRAME_SINK_SUPPORT_CLIENT_H_ |
| 6 #define CC_TEST_MOCK_COMPOSITOR_FRAME_SINK_SUPPORT_CLIENT_H_ |
| 7 |
| 8 #include "cc/surfaces/compositor_frame_sink_support.h" |
| 9 #include "cc/surfaces/compositor_frame_sink_support_client.h" |
| 10 #include "cc/test/compositor_frame_helpers.h" |
| 11 #include "testing/gmock/include/gmock/gmock.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 |
| 14 namespace cc { |
| 15 namespace test { |
| 16 |
| 17 class MockCompositorFrameSinkSupportClient |
| 18 : public CompositorFrameSinkSupportClient { |
| 19 public: |
| 20 explicit MockCompositorFrameSinkSupportClient( |
| 21 bool create_surface_during_eviction); |
| 22 ~MockCompositorFrameSinkSupportClient() override; |
| 23 |
| 24 void set_support(CompositorFrameSinkSupport* support) { support_ = support; } |
| 25 |
| 26 // CompositorFrameSinkSupportClient implementation. |
| 27 MOCK_METHOD1(DidReceiveCompositorFrameAck, |
| 28 void(const ReturnedResourceArray&)); |
| 29 MOCK_METHOD1(OnBeginFrame, void(const BeginFrameArgs&)); |
| 30 MOCK_METHOD1(ReclaimResources, void(const ReturnedResourceArray&)); |
| 31 MOCK_METHOD2(WillDrawSurface, void(const LocalSurfaceId&, const gfx::Rect&)); |
| 32 |
| 33 private: |
| 34 void ReclaimResourcesInternal(const ReturnedResourceArray& resources); |
| 35 |
| 36 void CreateSurfaceDrawCallback(const ReturnedResourceArray& resources); |
| 37 |
| 38 CompositorFrameSinkSupport* support_ = nullptr; |
| 39 }; |
| 40 |
| 41 } // namespace test |
| 42 } // namespace cc |
| 43 |
| 44 #endif // CC_TEST_MOCK_COMPOSITOR_FRAME_SINK_SUPPORT_CLIENT_H_ |
OLD | NEW |