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 typedef std::unordered_map<int, scoped_ptr<TestLayer>> LayerIdToTestLayer; |
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 scoped_refptr<AnimationTimeline> timeline_; | 192 scoped_refptr<AnimationTimeline> timeline_; |
192 scoped_refptr<AnimationPlayer> player_; | 193 scoped_refptr<AnimationPlayer> player_; |
193 | 194 |
194 scoped_refptr<AnimationTimeline> timeline_impl_; | 195 scoped_refptr<AnimationTimeline> timeline_impl_; |
195 scoped_refptr<AnimationPlayer> player_impl_; | 196 scoped_refptr<AnimationPlayer> player_impl_; |
196 }; | 197 }; |
197 | 198 |
198 } // namespace cc | 199 } // namespace cc |
199 | 200 |
200 #endif // CC_TEST_ANIMATION_TIMELINES_TEST_COMMON_H_ | 201 #endif // CC_TEST_ANIMATION_TIMELINES_TEST_COMMON_H_ |
OLD | NEW |