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

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

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase Created 4 years, 8 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/test_gpu_memory_buffer_manager.cc ('k') | cc/test/test_hooks.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_TEST_HOOKS_H_ 5 #ifndef CC_TEST_TEST_HOOKS_H_
6 #define CC_TEST_TEST_HOOKS_H_ 6 #define CC_TEST_TEST_HOOKS_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "cc/animation/animation_delegate.h" 9 #include "cc/animation/animation_delegate.h"
10 #include "cc/trees/layer_tree_host.h" 10 #include "cc/trees/layer_tree_host.h"
11 #include "cc/trees/layer_tree_host_impl.h" 11 #include "cc/trees/layer_tree_host_impl.h"
12 12
13 namespace cc { 13 namespace cc {
14 14
15 namespace proto { 15 namespace proto {
16 class CompositorMessageToImpl; 16 class CompositorMessageToImpl;
17 } 17 }
18 18
19 // Used by test stubs to notify the test when something interesting happens. 19 // Used by test stubs to notify the test when something interesting happens.
20 class TestHooks : public AnimationDelegate { 20 class TestHooks : public AnimationDelegate {
21 public: 21 public:
22 TestHooks(); 22 TestHooks();
23 ~TestHooks() override; 23 ~TestHooks() override;
24 24
25 void ReadSettings(const LayerTreeSettings& settings); 25 void ReadSettings(const LayerTreeSettings& settings);
26 26
27 virtual void CreateResourceAndTileTaskWorkerPool( 27 virtual void CreateResourceAndTileTaskWorkerPool(
28 LayerTreeHostImpl* host_impl, 28 LayerTreeHostImpl* host_impl,
29 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool, 29 std::unique_ptr<TileTaskWorkerPool>* tile_task_worker_pool,
30 scoped_ptr<ResourcePool>* resource_pool); 30 std::unique_ptr<ResourcePool>* resource_pool);
31 virtual void WillBeginImplFrameOnThread(LayerTreeHostImpl* host_impl, 31 virtual void WillBeginImplFrameOnThread(LayerTreeHostImpl* host_impl,
32 const BeginFrameArgs& args) {} 32 const BeginFrameArgs& args) {}
33 virtual void DidFinishImplFrameOnThread(LayerTreeHostImpl* host_impl) {} 33 virtual void DidFinishImplFrameOnThread(LayerTreeHostImpl* host_impl) {}
34 virtual void BeginMainFrameAbortedOnThread(LayerTreeHostImpl* host_impl, 34 virtual void BeginMainFrameAbortedOnThread(LayerTreeHostImpl* host_impl,
35 CommitEarlyOutReason reason) {} 35 CommitEarlyOutReason reason) {}
36 virtual void WillPrepareTiles(LayerTreeHostImpl* host_impl) {} 36 virtual void WillPrepareTiles(LayerTreeHostImpl* host_impl) {}
37 virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) {} 37 virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) {}
38 virtual void WillCommitCompleteOnThread(LayerTreeHostImpl* host_impl) {} 38 virtual void WillCommitCompleteOnThread(LayerTreeHostImpl* host_impl) {}
39 virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) {} 39 virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) {}
40 virtual void WillActivateTreeOnThread(LayerTreeHostImpl* host_impl) {} 40 virtual void WillActivateTreeOnThread(LayerTreeHostImpl* host_impl) {}
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 int group) override {} 132 int group) override {}
133 void NotifyAnimationFinished(base::TimeTicks monotonic_time, 133 void NotifyAnimationFinished(base::TimeTicks monotonic_time,
134 TargetProperty::Type target_property, 134 TargetProperty::Type target_property,
135 int group) override {} 135 int group) override {}
136 void NotifyAnimationAborted(base::TimeTicks monotonic_time, 136 void NotifyAnimationAborted(base::TimeTicks monotonic_time,
137 TargetProperty::Type target_property, 137 TargetProperty::Type target_property,
138 int group) override {} 138 int group) override {}
139 void NotifyAnimationTakeover(base::TimeTicks monotonic_time, 139 void NotifyAnimationTakeover(base::TimeTicks monotonic_time,
140 TargetProperty::Type target_property, 140 TargetProperty::Type target_property,
141 double animation_start_time, 141 double animation_start_time,
142 scoped_ptr<AnimationCurve> curve) override {} 142 std::unique_ptr<AnimationCurve> curve) override {
143 }
143 144
144 virtual void RequestNewOutputSurface() = 0; 145 virtual void RequestNewOutputSurface() = 0;
145 146
146 // Used to notify the test to create the Remote client LayerTreeHost on 147 // Used to notify the test to create the Remote client LayerTreeHost on
147 // receiving a CompositorMessageToImpl of type INITIALIZE_IMPL. 148 // receiving a CompositorMessageToImpl of type INITIALIZE_IMPL.
148 virtual void CreateRemoteClientHost( 149 virtual void CreateRemoteClientHost(
149 const proto::CompositorMessageToImpl& proto) {} 150 const proto::CompositorMessageToImpl& proto) {}
150 151
151 // Used to notify the test to destroy the Remote client LayerTreeHost on 152 // Used to notify the test to destroy the Remote client LayerTreeHost on
152 // receiving a CompositorMessageToImpl of type CLOSE_IMPL. 153 // receiving a CompositorMessageToImpl of type CLOSE_IMPL.
153 virtual void DestroyRemoteClientHost() {} 154 virtual void DestroyRemoteClientHost() {}
154 }; 155 };
155 156
156 } // namespace cc 157 } // namespace cc
157 158
158 #endif // CC_TEST_TEST_HOOKS_H_ 159 #endif // CC_TEST_TEST_HOOKS_H_
OLDNEW
« no previous file with comments | « cc/test/test_gpu_memory_buffer_manager.cc ('k') | cc/test/test_hooks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698