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

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

Issue 2174653002: cc: Break up with FakeLayerTreeHostClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fakeoutputsurface
Patch Set: lthclient-tests: . Created 4 years, 5 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/layers/ui_resource_layer_unittest.cc ('k') | cc/test/fake_layer_tree_host_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_TEST_FAKE_LAYER_TREE_HOST_CLIENT_H_ 5 #ifndef CC_TEST_FAKE_LAYER_TREE_HOST_CLIENT_H_
6 #define CC_TEST_FAKE_LAYER_TREE_HOST_CLIENT_H_ 6 #define CC_TEST_FAKE_LAYER_TREE_HOST_CLIENT_H_
7 7
8 #include <memory> 8 #include "cc/test/stub_layer_tree_host_client.h"
9
10 #include "cc/input/input_handler.h"
11 #include "cc/test/test_context_provider.h"
12 #include "cc/trees/layer_tree_host_client.h"
13 #include "cc/trees/layer_tree_host_single_thread_client.h"
14 9
15 namespace cc { 10 namespace cc {
16 class OutputSurface; 11 class LayerTreeHost;
17 12
18 class FakeLayerTreeHostClient : public LayerTreeHostClient, 13 class FakeLayerTreeHostClient : public StubLayerTreeHostClient {
19 public LayerTreeHostSingleThreadClient {
20 public: 14 public:
21 FakeLayerTreeHostClient(); 15 FakeLayerTreeHostClient();
22 ~FakeLayerTreeHostClient() override; 16 ~FakeLayerTreeHostClient() override;
23 17
24 // Caller responsible for unsetting this and maintaining the host's lifetime. 18 // Caller responsible for unsetting this and maintaining the host's lifetime.
25 void SetLayerTreeHost(LayerTreeHost* host) { host_ = host; } 19 void SetLayerTreeHost(LayerTreeHost* host) { host_ = host; }
26 20
27 // LayerTreeHostClient implementation. 21 // StubLayerTreeHostClient overrides.
28 void WillBeginMainFrame() override {}
29 void DidBeginMainFrame() override {}
30 void BeginMainFrame(const BeginFrameArgs& args) override {}
31 void BeginMainFrameNotExpectedSoon() override {}
32 void UpdateLayerTreeHost() override {}
33 void ApplyViewportDeltas(const gfx::Vector2dF& inner_delta,
34 const gfx::Vector2dF& outer_delta,
35 const gfx::Vector2dF& elastic_overscroll_delta,
36 float page_scale,
37 float top_controls_delta) override {}
38 void RequestNewOutputSurface() override; 22 void RequestNewOutputSurface() override;
39 void DidInitializeOutputSurface() override {}
40 void DidFailToInitializeOutputSurface() override; 23 void DidFailToInitializeOutputSurface() override;
41 void WillCommit() override {}
42 void DidCommit() override {}
43 void DidCommitAndDrawFrame() override {}
44 void DidCompleteSwapBuffers() override {}
45 void DidCompletePageScaleAnimation() override {}
46
47 // LayerTreeHostSingleThreadClient implementation.
48 void DidPostSwapBuffers() override {}
49 void DidAbortSwapBuffers() override {}
50 24
51 private: 25 private:
52 LayerTreeHost* host_ = nullptr; 26 LayerTreeHost* host_ = nullptr;
53 }; 27 };
54 28
55 } // namespace cc 29 } // namespace cc
56 30
57 #endif // CC_TEST_FAKE_LAYER_TREE_HOST_CLIENT_H_ 31 #endif // CC_TEST_FAKE_LAYER_TREE_HOST_CLIENT_H_
OLDNEW
« no previous file with comments | « cc/layers/ui_resource_layer_unittest.cc ('k') | cc/test/fake_layer_tree_host_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698