Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / cc / animation / layer_animation_controller.cc
index 73e3d5a..b779a37 100644 (file)
@@ -16,7 +16,7 @@
 #include "cc/animation/scroll_offset_animation_curve.h"
 #include "cc/base/scoped_ptr_algorithm.h"
 #include "cc/output/filter_operations.h"
-#include "ui/gfx/box_f.h"
+#include "ui/gfx/geometry/box_f.h"
 #include "ui/gfx/transform.h"
 
 namespace cc {
@@ -25,8 +25,8 @@ LayerAnimationController::LayerAnimationController(int id)
     : registrar_(0),
       id_(id),
       is_active_(false),
-      value_provider_(NULL),
-      layer_animation_delegate_(NULL),
+      value_provider_(nullptr),
+      layer_animation_delegate_(nullptr),
       needs_to_start_animations_(false) {
 }
 
@@ -315,8 +315,8 @@ void LayerAnimationController::NotifyAnimationStarted(
     FOR_EACH_OBSERVER(LayerAnimationEventObserver, event_observers_,
                       OnAnimationStarted(event));
     if (layer_animation_delegate_)
-      layer_animation_delegate_->NotifyAnimationStarted(event.monotonic_time,
-                                                        event.target_property);
+      layer_animation_delegate_->NotifyAnimationStarted(
+          event.monotonic_time, event.target_property, event.group_id);
     return;
   }
 
@@ -332,7 +332,7 @@ void LayerAnimationController::NotifyAnimationStarted(
                         OnAnimationStarted(event));
       if (layer_animation_delegate_)
         layer_animation_delegate_->NotifyAnimationStarted(
-            event.monotonic_time, event.target_property);
+            event.monotonic_time, event.target_property, event.group_id);
 
       return;
     }
@@ -343,8 +343,8 @@ void LayerAnimationController::NotifyAnimationFinished(
     const AnimationEvent& event) {
   if (event.is_impl_only) {
     if (layer_animation_delegate_)
-      layer_animation_delegate_->NotifyAnimationFinished(event.monotonic_time,
-                                                         event.target_property);
+      layer_animation_delegate_->NotifyAnimationFinished(
+          event.monotonic_time, event.target_property, event.group_id);
     return;
   }
 
@@ -354,7 +354,7 @@ void LayerAnimationController::NotifyAnimationFinished(
       animations_[i]->set_received_finished_event(true);
       if (layer_animation_delegate_)
         layer_animation_delegate_->NotifyAnimationFinished(
-            event.monotonic_time, event.target_property);
+            event.monotonic_time, event.target_property, event.group_id);
 
       return;
     }
@@ -549,7 +549,7 @@ void LayerAnimationController::PushNewAnimationsToImplThread(
 
     // Scroll animations always start at the current scroll offset.
     if (animations_[i]->target_property() == Animation::ScrollOffset) {
-      gfx::Vector2dF current_scroll_offset;
+      gfx::ScrollOffset current_scroll_offset;
       if (controller_impl->value_provider_) {
         current_scroll_offset =
             controller_impl->value_provider_->ScrollOffsetForAnimation();
@@ -904,7 +904,7 @@ void LayerAnimationController::TickAnimations(base::TimeTicks monotonic_time) {
         case Animation::ScrollOffset: {
           const ScrollOffsetAnimationCurve* scroll_offset_animation_curve =
               animations_[i]->curve()->ToScrollOffsetAnimationCurve();
-          const gfx::Vector2dF scroll_offset =
+          const gfx::ScrollOffset scroll_offset =
               scroll_offset_animation_curve->GetValue(trimmed);
           NotifyObserversScrollOffsetAnimated(
               scroll_offset,
@@ -948,7 +948,7 @@ void LayerAnimationController::NotifyObserversOpacityAnimated(
     ObserverListBase<LayerAnimationValueObserver>::Iterator it(
         value_observers_);
     LayerAnimationValueObserver* obs;
-    while ((obs = it.GetNext()) != NULL) {
+    while ((obs = it.GetNext()) != nullptr) {
       if ((notify_active_observers && notify_pending_observers) ||
           (notify_active_observers && obs->IsActive()) ||
           (notify_pending_observers && !obs->IsActive()))
@@ -965,7 +965,7 @@ void LayerAnimationController::NotifyObserversTransformAnimated(
     ObserverListBase<LayerAnimationValueObserver>::Iterator it(
         value_observers_);
     LayerAnimationValueObserver* obs;
-    while ((obs = it.GetNext()) != NULL) {
+    while ((obs = it.GetNext()) != nullptr) {
       if ((notify_active_observers && notify_pending_observers) ||
           (notify_active_observers && obs->IsActive()) ||
           (notify_pending_observers && !obs->IsActive()))
@@ -982,7 +982,7 @@ void LayerAnimationController::NotifyObserversFilterAnimated(
     ObserverListBase<LayerAnimationValueObserver>::Iterator it(
         value_observers_);
     LayerAnimationValueObserver* obs;
-    while ((obs = it.GetNext()) != NULL) {
+    while ((obs = it.GetNext()) != nullptr) {
       if ((notify_active_observers && notify_pending_observers) ||
           (notify_active_observers && obs->IsActive()) ||
           (notify_pending_observers && !obs->IsActive()))
@@ -992,14 +992,14 @@ void LayerAnimationController::NotifyObserversFilterAnimated(
 }
 
 void LayerAnimationController::NotifyObserversScrollOffsetAnimated(
-    const gfx::Vector2dF& scroll_offset,
+    const gfx::ScrollOffset& scroll_offset,
     bool notify_active_observers,
     bool notify_pending_observers) {
   if (value_observers_.might_have_observers()) {
     ObserverListBase<LayerAnimationValueObserver>::Iterator it(
         value_observers_);
     LayerAnimationValueObserver* obs;
-    while ((obs = it.GetNext()) != NULL) {
+    while ((obs = it.GetNext()) != nullptr) {
       if ((notify_active_observers && notify_pending_observers) ||
           (notify_active_observers && obs->IsActive()) ||
           (notify_pending_observers && !obs->IsActive()))
@@ -1018,7 +1018,7 @@ bool LayerAnimationController::HasValueObserver() {
   if (value_observers_.might_have_observers()) {
     ObserverListBase<LayerAnimationValueObserver>::Iterator it(
         value_observers_);
-    return it.GetNext() != NULL;
+    return it.GetNext() != nullptr;
   }
   return false;
 }
@@ -1028,7 +1028,7 @@ bool LayerAnimationController::HasActiveValueObserver() {
     ObserverListBase<LayerAnimationValueObserver>::Iterator it(
         value_observers_);
     LayerAnimationValueObserver* obs;
-    while ((obs = it.GetNext()) != NULL)
+    while ((obs = it.GetNext()) != nullptr)
       if (obs->IsActive())
         return true;
   }