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

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

Issue 2646623002: cc: Remove all blimp code from cc. (Closed)
Patch Set: test build Created 3 years, 11 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
« no previous file with comments | « cc/test/fake_picture_layer.cc ('k') | cc/test/fake_remote_compositor_bridge.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_REMOTE_COMPOSITOR_BRIDGE_H_
6 #define CC_TEST_FAKE_REMOTE_COMPOSITOR_BRIDGE_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "base/memory/weak_ptr.h"
12 #include "base/single_thread_task_runner.h"
13 #include "cc/blimp/compositor_proto_state.h"
14 #include "cc/blimp/remote_compositor_bridge.h"
15
16 namespace cc {
17
18 // An implementation of the RemoteCompositorBridge for tests that pump
19 // BeginMainFrames as soon as the client requests them.
20 class FakeRemoteCompositorBridge : public RemoteCompositorBridge {
21 public:
22 FakeRemoteCompositorBridge(
23 scoped_refptr<base::SingleThreadTaskRunner> compositor_main_task_runner);
24 ~FakeRemoteCompositorBridge() override;
25
26 // RemoteCompositorBridge implementation.
27 void BindToClient(RemoteCompositorBridgeClient* client) override;
28 void ScheduleMainFrame() override;
29 void ProcessCompositorStateUpdate(
30 std::unique_ptr<CompositorProtoState> compositor_proto_state) override {}
31
32 bool has_pending_update() const { return has_pending_update_; }
33
34 protected:
35 void BeginMainFrame();
36
37 RemoteCompositorBridgeClient* client_;
38
39 private:
40 bool has_pending_update_ = false;
41 base::WeakPtrFactory<FakeRemoteCompositorBridge> weak_factory_;
42 };
43
44 } // namespace cc
45
46 #endif // CC_TEST_FAKE_REMOTE_COMPOSITOR_BRIDGE_H_
OLDNEW
« no previous file with comments | « cc/test/fake_picture_layer.cc ('k') | cc/test/fake_remote_compositor_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698