summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/constrained_window_animation.cc
blob: cedd0ba53f4d69d0df377f9e084fb7acb9c86c2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/views/constrained_window_animation.h"
#include "chrome/browser/views/constrained_window_impl.h"

// The duration of the animation.
static const int kDuration = 360;

// The frame-rate for the animation.
static const int kFrameRate = 60;

////////////////////////////////////////////////////////////////////////////////
// ConstrainedWindowAnimation, public:

ConstrainedWindowAnimation::ConstrainedWindowAnimation(
    ConstrainedWindowImpl* window)
    : Animation(kDuration, kFrameRate, NULL), window_(window) {
}

ConstrainedWindowAnimation::~ConstrainedWindowAnimation() {
}

////////////////////////////////////////////////////////////////////////////////
// ConstrainedWindowAnimation, Animation implementation:

void ConstrainedWindowAnimation::AnimateToState(double state) {
  window_->SetTitlebarVisibilityPercentage(state);
}