Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(594)

Unified Diff: ash/wm/frame_painter.h

Issue 9720043: M20 Ash: Animate window header transition from active to inactive (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nicer diff Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/wm/frame_painter.cc » ('j') | ash/wm/frame_painter.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/frame_painter.h
diff --git a/ash/wm/frame_painter.h b/ash/wm/frame_painter.h
index 5be8ca14652a5b4b6a14dde0657dabac4b1f5976..c4624014442a445b1895e0a7232a7e28f144e2b1 100644
--- a/ash/wm/frame_painter.h
+++ b/ash/wm/frame_painter.h
@@ -8,15 +8,20 @@
#include "ash/ash_export.h"
#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+#include "ui/base/animation/animation_delegate.h"
+#include "ui/gfx/rect.h"
class SkBitmap;
namespace gfx {
class Canvas;
class Font;
-class Rect;
class Point;
class Size;
}
+namespace ui {
+class SlideAnimation;
+}
namespace views {
class ImageButton;
class NonClientFrameView;
@@ -29,7 +34,7 @@ namespace ash {
// Helper class for painting window frames. Exists to share code between
// various implementations of views::NonClientFrameView. Canonical source of
// layout constants for Ash window frames.
-class ASH_EXPORT FramePainter {
+class ASH_EXPORT FramePainter : public ui::AnimationDelegate {
public:
FramePainter();
~FramePainter();
James Cook 2012/03/19 19:25:58 must be virtual, clang will complain
@@ -74,6 +79,9 @@ class ASH_EXPORT FramePainter {
// |maximized_layout| appearance.
void LayoutHeader(views::NonClientFrameView* view, bool maximized_layout);
+ // Overridden from ui::AnimationDelegate
+ void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
+
private:
// Sets the images for a button base on IDs from the |frame_| theme provider.
void SetButtonImages(views::ImageButton* button,
@@ -98,6 +106,14 @@ class ASH_EXPORT FramePainter {
const SkBitmap* header_left_edge_;
const SkBitmap* header_right_edge_;
+ // The bitmap last used for painting header.
+ const SkBitmap* previous_theme_frame_;
+ // The bitmap we are crossfading from.
+ const SkBitmap* crossfade_theme_frame_;
+
+ gfx::Rect header_frame_bounds_;
+ scoped_ptr<ui::SlideAnimation> crossfade_animation_;
+
DISALLOW_COPY_AND_ASSIGN(FramePainter);
};
« no previous file with comments | « no previous file | ash/wm/frame_painter.cc » ('j') | ash/wm/frame_painter.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698