Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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_FAKE_COMPOSITOR_PROTO_STATE_SINK_H_ | |
| 6 #define CC_TEST_FAKE_COMPOSITOR_PROTO_STATE_SINK_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 #include "base/memory/weak_ptr.h" | |
| 12 #include "cc/blimp/compositor_proto_state_sink.h" | |
| 13 | |
| 14 namespace cc { | |
| 15 | |
| 16 // An implementation of the CompositorStateSink for tests that pumps | |
| 17 // BeginMainFrames as soon as the client requests them. | |
| 18 class FakeCompositorProtoStateSink : public CompositorProtoStateSink { | |
| 19 public: | |
| 20 FakeCompositorProtoStateSink(); | |
| 21 ~FakeCompositorProtoStateSink() override; | |
| 22 | |
| 23 // CompositorProtoStateSink implementation. | |
| 24 void BindToClient(CompositorProtoStateSinkClient* client) override; | |
| 25 void ScheduleMainFrame() override; | |
| 26 void ProcessCompositorStateUpdate( | |
| 27 std::unique_ptr<CompositorProtoState> compositor_proto_state) override{}; | |
|
danakj
2016/09/26 21:36:54
git cl format? no ;
Khushal
2016/09/27 01:07:50
Done.
| |
| 28 | |
| 29 private: | |
| 30 void BeginMainFrame(); | |
| 31 | |
| 32 CompositorProtoStateSinkClient* client_; | |
| 33 base::WeakPtrFactory<FakeCompositorProtoStateSink> weak_factory_; | |
| 34 }; | |
| 35 | |
| 36 } // namespace cc | |
| 37 | |
| 38 #endif // CC_TEST_FAKE_COMPOSITOR_PROTO_STATE_SINK_H_ | |
| OLD | NEW |