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

Unified Diff: views/widget/native_widget_views.cc

Issue 8362006: Reland r107720 - Enable the new layer animation framework. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 9 years, 2 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 | « views/views.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/native_widget_views.cc
diff --git a/views/widget/native_widget_views.cc b/views/widget/native_widget_views.cc
index 4ed77ca53a64d6e2eee477ff724fe467a7de5f46..7d2632dbc304c02460710a5dc2b550d06bfea6b7 100644
--- a/views/widget/native_widget_views.cc
+++ b/views/widget/native_widget_views.cc
@@ -6,6 +6,8 @@
#include "base/bind.h"
#include "ui/gfx/compositor/compositor.h"
+#include "ui/gfx/compositor/layer.h"
+#include "ui/gfx/compositor/layer_animator.h"
#include "views/view.h"
#include "views/views_delegate.h"
#include "views/widget/native_widget_view.h"
@@ -462,6 +464,9 @@ void NativeWidgetViews::Maximize() {
}
void NativeWidgetViews::Minimize() {
+ if (view_->layer() && view_->layer()->GetAnimator()->is_animating())
+ return;
+
gfx::Rect view_bounds = view_->bounds();
gfx::Rect parent_bounds = view_->parent()->bounds();
@@ -503,6 +508,9 @@ bool NativeWidgetViews::IsMinimized() const {
}
void NativeWidgetViews::Restore() {
+ if (view_->layer() && view_->layer()->GetAnimator()->is_animating())
+ return;
+
window_state_ = ui::SHOW_STATE_NORMAL;
view_->SetBoundsRect(restored_bounds_);
view_->SetTransform(restored_transform_);
« no previous file with comments | « views/views.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698