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

Side by Side Diff: cc/animation/element_animations.cc

Issue 1698813002: CC Animation: Expose TargetProperty enum to be aliased in Blink Platform. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use custom hash in unordered_set. Created 4 years, 10 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
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 #include "cc/animation/element_animations.h" 5 #include "cc/animation/element_animations.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "cc/animation/animation_host.h" 8 #include "cc/animation/animation_host.h"
9 #include "cc/animation/animation_player.h" 9 #include "cc/animation/animation_player.h"
10 #include "cc/animation/animation_registrar.h" 10 #include "cc/animation/animation_registrar.h"
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 232
233 void ElementAnimations::DestroyPendingValueObserver() { 233 void ElementAnimations::DestroyPendingValueObserver() {
234 if (layer_animation_controller_ && pending_value_observer_) 234 if (layer_animation_controller_ && pending_value_observer_)
235 layer_animation_controller_->RemoveValueObserver( 235 layer_animation_controller_->RemoveValueObserver(
236 pending_value_observer_.get()); 236 pending_value_observer_.get());
237 pending_value_observer_ = nullptr; 237 pending_value_observer_ = nullptr;
238 } 238 }
239 239
240 void ElementAnimations::NotifyAnimationStarted( 240 void ElementAnimations::NotifyAnimationStarted(
241 base::TimeTicks monotonic_time, 241 base::TimeTicks monotonic_time,
242 Animation::TargetProperty target_property, 242 AnimationTargetProperty target_property,
243 int group) { 243 int group) {
244 for (PlayersListNode* node = players_list_->head(); 244 for (PlayersListNode* node = players_list_->head();
245 node != players_list_->end(); node = node->next()) { 245 node != players_list_->end(); node = node->next()) {
246 AnimationPlayer* player = node->value(); 246 AnimationPlayer* player = node->value();
247 player->NotifyAnimationStarted(monotonic_time, target_property, group); 247 player->NotifyAnimationStarted(monotonic_time, target_property, group);
248 } 248 }
249 } 249 }
250 250
251 void ElementAnimations::NotifyAnimationFinished( 251 void ElementAnimations::NotifyAnimationFinished(
252 base::TimeTicks monotonic_time, 252 base::TimeTicks monotonic_time,
253 Animation::TargetProperty target_property, 253 AnimationTargetProperty target_property,
254 int group) { 254 int group) {
255 for (PlayersListNode* node = players_list_->head(); 255 for (PlayersListNode* node = players_list_->head();
256 node != players_list_->end(); node = node->next()) { 256 node != players_list_->end(); node = node->next()) {
257 AnimationPlayer* player = node->value(); 257 AnimationPlayer* player = node->value();
258 player->NotifyAnimationFinished(monotonic_time, target_property, group); 258 player->NotifyAnimationFinished(monotonic_time, target_property, group);
259 } 259 }
260 } 260 }
261 261
262 void ElementAnimations::NotifyAnimationAborted( 262 void ElementAnimations::NotifyAnimationAborted(
263 base::TimeTicks monotonic_time, 263 base::TimeTicks monotonic_time,
264 Animation::TargetProperty target_property, 264 AnimationTargetProperty target_property,
265 int group) { 265 int group) {
266 for (PlayersListNode* node = players_list_->head(); 266 for (PlayersListNode* node = players_list_->head();
267 node != players_list_->end(); node = node->next()) { 267 node != players_list_->end(); node = node->next()) {
268 AnimationPlayer* player = node->value(); 268 AnimationPlayer* player = node->value();
269 player->NotifyAnimationAborted(monotonic_time, target_property, group); 269 player->NotifyAnimationAborted(monotonic_time, target_property, group);
270 } 270 }
271 } 271 }
272 272
273 gfx::ScrollOffset ElementAnimations::ScrollOffsetForAnimation() const { 273 gfx::ScrollOffset ElementAnimations::ScrollOffsetForAnimation() const {
274 DCHECK(layer_animation_controller_); 274 DCHECK(layer_animation_controller_);
275 if (animation_host()) { 275 if (animation_host()) {
276 DCHECK(animation_host()->mutator_host_client()); 276 DCHECK(animation_host()->mutator_host_client());
277 return animation_host()->mutator_host_client()->GetScrollOffsetForAnimation( 277 return animation_host()->mutator_host_client()->GetScrollOffsetForAnimation(
278 layer_id()); 278 layer_id());
279 } 279 }
280 280
281 return gfx::ScrollOffset(); 281 return gfx::ScrollOffset();
282 } 282 }
283 283
284 } // namespace cc 284 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698