Update CrOS OOBE throbber to MD throbber; delete old asset
[chromium-blink-merge.git] / ui / views / animation / ink_drop_animation_controller_impl.cc
blob08e3888394d5b92533525b258786586a0fce4b0e
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
3 // found in the LICENSE file.
5 #include "ui/views/animation/ink_drop_animation_controller_impl.h"
7 #include "ui/views/animation/ink_drop_animation.h"
8 #include "ui/views/animation/ink_drop_host.h"
10 namespace views {
12 InkDropAnimationControllerImpl::InkDropAnimationControllerImpl(
13 InkDropHost* ink_drop_host)
14 : ink_drop_host_(ink_drop_host),
15 ink_drop_animation_(new InkDropAnimation()) {
16 // TODO(bruthig): Change this to only be called before the ink drop becomes
17 // active. See www.crbug.com/522175.
18 ink_drop_host_->AddInkDropLayer(ink_drop_animation_->root_layer());
21 InkDropAnimationControllerImpl::~InkDropAnimationControllerImpl() {
22 // TODO(bruthig): Change this to be called when the ink drop becomes hidden.
23 // See www.crbug.com/522175.
24 ink_drop_host_->RemoveInkDropLayer(ink_drop_animation_->root_layer());
27 void InkDropAnimationControllerImpl::AnimateToState(InkDropState state) {
28 ink_drop_animation_->AnimateToState(state);
31 void InkDropAnimationControllerImpl::SetInkDropSize(const gfx::Size& size) {
32 ink_drop_animation_->SetInkDropSize(size);
35 gfx::Rect InkDropAnimationControllerImpl::GetInkDropBounds() const {
36 return ink_drop_animation_->GetInkDropBounds();
39 void InkDropAnimationControllerImpl::SetInkDropBounds(const gfx::Rect& bounds) {
40 ink_drop_animation_->SetInkDropBounds(bounds);
43 } // namespace views