OLD | NEW |
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_ANIMATION_TIMELINES_TEST_COMMON_H_ | 5 #ifndef CC_TEST_ANIMATION_TIMELINES_TEST_COMMON_H_ |
6 #define CC_TEST_ANIMATION_TIMELINES_TEST_COMMON_H_ | 6 #define CC_TEST_ANIMATION_TIMELINES_TEST_COMMON_H_ |
7 | 7 |
8 #include "base/containers/scoped_ptr_hash_map.h" | 8 #include <unordered_map> |
| 9 |
9 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
10 #include "cc/animation/animation.h" | 11 #include "cc/animation/animation.h" |
11 #include "cc/animation/animation_delegate.h" | 12 #include "cc/animation/animation_delegate.h" |
12 #include "cc/animation/animation_host.h" | 13 #include "cc/animation/animation_host.h" |
13 #include "cc/trees/mutator_host_client.h" | 14 #include "cc/trees/mutator_host_client.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
15 #include "ui/gfx/geometry/scroll_offset.h" | 16 #include "ui/gfx/geometry/scroll_offset.h" |
16 | 17 |
17 namespace cc { | 18 namespace cc { |
18 | 19 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 void ExpectTransformPropertyMutated(int layer_id, | 128 void ExpectTransformPropertyMutated(int layer_id, |
128 LayerTreeType tree_type, | 129 LayerTreeType tree_type, |
129 int transform_x, | 130 int transform_x, |
130 int transform_y) const; | 131 int transform_y) const; |
131 | 132 |
132 TestLayer* FindTestLayer(int layer_id, LayerTreeType tree_type) const; | 133 TestLayer* FindTestLayer(int layer_id, LayerTreeType tree_type) const; |
133 | 134 |
134 private: | 135 private: |
135 scoped_ptr<AnimationHost> host_; | 136 scoped_ptr<AnimationHost> host_; |
136 | 137 |
137 typedef base::ScopedPtrHashMap<int, scoped_ptr<TestLayer>> LayerIdToTestLayer; | 138 using LayerIdToTestLayer = std::unordered_map<int, scoped_ptr<TestLayer>>; |
138 LayerIdToTestLayer layers_in_active_tree_; | 139 LayerIdToTestLayer layers_in_active_tree_; |
139 LayerIdToTestLayer layers_in_pending_tree_; | 140 LayerIdToTestLayer layers_in_pending_tree_; |
140 | 141 |
141 bool mutators_need_commit_; | 142 bool mutators_need_commit_; |
142 }; | 143 }; |
143 | 144 |
144 class TestAnimationDelegate : public AnimationDelegate { | 145 class TestAnimationDelegate : public AnimationDelegate { |
145 public: | 146 public: |
146 TestAnimationDelegate(); | 147 TestAnimationDelegate(); |
147 | 148 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 scoped_refptr<AnimationTimeline> timeline_; | 195 scoped_refptr<AnimationTimeline> timeline_; |
195 scoped_refptr<AnimationPlayer> player_; | 196 scoped_refptr<AnimationPlayer> player_; |
196 | 197 |
197 scoped_refptr<AnimationTimeline> timeline_impl_; | 198 scoped_refptr<AnimationTimeline> timeline_impl_; |
198 scoped_refptr<AnimationPlayer> player_impl_; | 199 scoped_refptr<AnimationPlayer> player_impl_; |
199 }; | 200 }; |
200 | 201 |
201 } // namespace cc | 202 } // namespace cc |
202 | 203 |
203 #endif // CC_TEST_ANIMATION_TIMELINES_TEST_COMMON_H_ | 204 #endif // CC_TEST_ANIMATION_TIMELINES_TEST_COMMON_H_ |
OLD | NEW |