Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / ui / compositor / closure_animation_observer.cc
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/compositor/closure_animation_observer.h"
6
7 namespace ui {
8
9 ClosureAnimationObserver::ClosureAnimationObserver(const base::Closure& closure)
10     : closure_(closure) {
11   DCHECK(!closure_.is_null());
12 }
13
14 ClosureAnimationObserver::~ClosureAnimationObserver() {
15 }
16
17 void ClosureAnimationObserver::OnImplicitAnimationsCompleted() {
18   closure_.Run();
19   delete this;
20 }
21
22 }  // namespace ui