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

Side by Side Diff: cc/test/stub_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/test/layer_test_common.h ('k') | cc/test/stub_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 2016 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_STUB_LAYER_TREE_HOST_CLIENT_H_
6 #define CC_TEST_FAKE_LAYER_TREE_HOST_CLIENT_H_ 6 #define CC_TEST_STUB_LAYER_TREE_HOST_CLIENT_H_
7 7
8 #include <memory>
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" 8 #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;
17 11
18 class FakeLayerTreeHostClient : public LayerTreeHostClient, 12 class StubLayerTreeHostClient : public LayerTreeHostClient {
19 public LayerTreeHostSingleThreadClient {
20 public: 13 public:
21 FakeLayerTreeHostClient(); 14 ~StubLayerTreeHostClient() override;
22 ~FakeLayerTreeHostClient() override;
23
24 // Caller responsible for unsetting this and maintaining the host's lifetime.
25 void SetLayerTreeHost(LayerTreeHost* host) { host_ = host; }
26 15
27 // LayerTreeHostClient implementation. 16 // LayerTreeHostClient implementation.
28 void WillBeginMainFrame() override {} 17 void WillBeginMainFrame() override {}
29 void DidBeginMainFrame() override {} 18 void DidBeginMainFrame() override {}
30 void BeginMainFrame(const BeginFrameArgs& args) override {} 19 void BeginMainFrame(const BeginFrameArgs& args) override {}
31 void BeginMainFrameNotExpectedSoon() override {} 20 void BeginMainFrameNotExpectedSoon() override {}
32 void UpdateLayerTreeHost() override {} 21 void UpdateLayerTreeHost() override {}
33 void ApplyViewportDeltas(const gfx::Vector2dF& inner_delta, 22 void ApplyViewportDeltas(const gfx::Vector2dF& inner_delta,
34 const gfx::Vector2dF& outer_delta, 23 const gfx::Vector2dF& outer_delta,
35 const gfx::Vector2dF& elastic_overscroll_delta, 24 const gfx::Vector2dF& elastic_overscroll_delta,
36 float page_scale, 25 float page_scale,
37 float top_controls_delta) override {} 26 float top_controls_delta) override {}
38 void RequestNewOutputSurface() override; 27 void RequestNewOutputSurface() override {}
39 void DidInitializeOutputSurface() override {} 28 void DidInitializeOutputSurface() override {}
40 void DidFailToInitializeOutputSurface() override; 29 void DidFailToInitializeOutputSurface() override {}
41 void WillCommit() override {} 30 void WillCommit() override {}
42 void DidCommit() override {} 31 void DidCommit() override {}
43 void DidCommitAndDrawFrame() override {} 32 void DidCommitAndDrawFrame() override {}
44 void DidCompleteSwapBuffers() override {} 33 void DidCompleteSwapBuffers() override {}
45 void DidCompletePageScaleAnimation() override {} 34 void DidCompletePageScaleAnimation() override {}
46
47 // LayerTreeHostSingleThreadClient implementation.
48 void DidPostSwapBuffers() override {}
49 void DidAbortSwapBuffers() override {}
50
51 private:
52 LayerTreeHost* host_ = nullptr;
53 }; 35 };
54 36
55 } // namespace cc 37 } // namespace cc
56 38
57 #endif // CC_TEST_FAKE_LAYER_TREE_HOST_CLIENT_H_ 39 #endif // CC_TEST_STUB_LAYER_TREE_HOST_CLIENT_H_
OLDNEW
« no previous file with comments | « cc/test/layer_test_common.h ('k') | cc/test/stub_layer_tree_host_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698