| Index: ui/compositor/layer_animator.cc
|
| diff --git a/ui/compositor/layer_animator.cc b/ui/compositor/layer_animator.cc
|
| index c1bfd7a4a965494060a1424c427678f1145f9f98..a0d904c30b8d44448fd71e93480b42b4c0dda6c9 100644
|
| --- a/ui/compositor/layer_animator.cc
|
| +++ b/ui/compositor/layer_animator.cc
|
| @@ -119,6 +119,34 @@ bool LayerAnimator::GetTargetVisibility() const {
|
| return target.visibility;
|
| }
|
|
|
| +void LayerAnimator::SetBrightness(float brightness) {
|
| + base::TimeDelta duration = GetTransitionDuration();
|
| + scoped_ptr<LayerAnimationElement> element(
|
| + LayerAnimationElement::CreateBrightnessElement(brightness, duration));
|
| + element->set_tween_type(tween_type_);
|
| + StartAnimation(new LayerAnimationSequence(element.release()));
|
| +}
|
| +
|
| +float LayerAnimator::GetTargetBrightness() const {
|
| + LayerAnimationElement::TargetValue target(delegate());
|
| + GetTargetValue(&target);
|
| + return target.brightness;
|
| +}
|
| +
|
| +void LayerAnimator::SetGrayscale(float grayscale) {
|
| + base::TimeDelta duration = GetTransitionDuration();
|
| + scoped_ptr<LayerAnimationElement> element(
|
| + LayerAnimationElement::CreateGrayscaleElement(grayscale, duration));
|
| + element->set_tween_type(tween_type_);
|
| + StartAnimation(new LayerAnimationSequence(element.release()));
|
| +}
|
| +
|
| +float LayerAnimator::GetTargetGrayscale() const {
|
| + LayerAnimationElement::TargetValue target(delegate());
|
| + GetTargetValue(&target);
|
| + return target.grayscale;
|
| +}
|
| +
|
| void LayerAnimator::SetDelegate(LayerAnimationDelegate* delegate) {
|
| DCHECK(delegate);
|
| delegate_ = delegate;
|
|
|