Commit bfacb01f authored by brettw@chromium.org's avatar brettw@chromium.org

Fix the Views GTK build.

I mvoed the implementation of the previously-inline amimate function to the .cc file so we don't have to depend on STL includes in the header.

Review URL: http://codereview.chromium.org/155170

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20091 0039d316-1c4b-4281-b951-d872f2087c98
parent 5c9cc1ac
...@@ -84,6 +84,12 @@ void Animator::AnimateToBounds(const gfx::Rect& bounds, int direction) { ...@@ -84,6 +84,12 @@ void Animator::AnimateToBounds(const gfx::Rect& bounds, int direction) {
animation_->Show(); animation_->Show();
} }
void Animator::AnimateToBounds(int x, int y, int width, int height,
int direction) {
AnimateToBounds(gfx::Rect(x, y, std::max(0, width), std::max(0, height)),
direction);
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Animator, AnimationDelegate: // Animator, AnimationDelegate:
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
#ifndef VIEWS_ANIMATOR_H_ #ifndef VIEWS_ANIMATOR_H_
#define VIEWS_ANIMATOR_H_ #define VIEWS_ANIMATOR_H_
#include <xutility>
#include "app/animation.h" #include "app/animation.h"
#include "base/gfx/rect.h" #include "base/gfx/rect.h"
#include "base/ref_counted.h" #include "base/ref_counted.h"
...@@ -65,10 +63,7 @@ class Animator : public AnimationDelegate { ...@@ -65,10 +63,7 @@ class Animator : public AnimationDelegate {
// combination of the above flags indicating what aspects of the bounds should // combination of the above flags indicating what aspects of the bounds should
// be animated. // be animated.
void AnimateToBounds(const gfx::Rect& bounds, int direction); void AnimateToBounds(const gfx::Rect& bounds, int direction);
void AnimateToBounds(int x, int y, int width, int height, int direction) { void AnimateToBounds(int x, int y, int width, int height, int direction);
AnimateToBounds(gfx::Rect(x, y, std::max(0, width), std::max(0, height)),
direction);
}
// Overridden from AnimationDelegate: // Overridden from AnimationDelegate:
virtual void AnimationEnded(const Animation* animation); virtual void AnimationEnded(const Animation* animation);
......
...@@ -11,6 +11,7 @@ class ThemeProvider; ...@@ -11,6 +11,7 @@ class ThemeProvider;
namespace gfx { namespace gfx {
class Path; class Path;
class Point;
class Rect; class Rect;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment