Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Side by Side Diff: cc/test/fake_compositor_proto_state_sink.h

Issue 2362073002: cc/blimp: Add a LayerTreeHostRemote implementation. (Closed)
Patch Set: Remaining comments from #4 Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 {}
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698