Index: mash/wm/frame/header_painter_util.cc |
diff --git a/ash/frame/header_painter_util.cc b/mash/wm/frame/header_painter_util.cc |
similarity index 68% |
copy from ash/frame/header_painter_util.cc |
copy to mash/wm/frame/header_painter_util.cc |
index 3e7dee553f255466652fcbee65612f0e5e3df162..a658d163dd0b566339e6778c9a4dc9987cf5c4f9 100644 |
--- a/ash/frame/header_painter_util.cc |
+++ b/mash/wm/frame/header_painter_util.cc |
@@ -1,14 +1,11 @@ |
-// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Copyright 2015 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 "ash/frame/header_painter_util.h" |
+#include "mash/wm/frame/header_painter_util.h" |
#include <algorithm> |
-#include "ui/aura/window.h" |
-#include "ui/compositor/layer.h" |
-#include "ui/compositor/layer_animator.h" |
#include "ui/gfx/font_list.h" |
#include "ui/gfx/geometry/rect.h" |
#include "ui/views/view.h" |
@@ -41,7 +38,8 @@ const int kThemeFrameImageInsetX = 5; |
} // namespace |
-namespace ash { |
+namespace mash { |
+namespace wm { |
// static |
int HeaderPainterUtil::GetTopCornerRadiusWhenRestored() { |
@@ -75,23 +73,8 @@ gfx::Rect HeaderPainterUtil::GetTitleBounds( |
// static |
bool HeaderPainterUtil::CanAnimateActivation(views::Widget* widget) { |
- // Do not animate the header if the parent (e.g. |
- // kShellWindowId_DefaultContainer) is already animating. All of the |
- // implementers of HeaderPainter animate activation by continuously painting |
- // during the animation. This gives the parent's animation a slower frame |
- // rate. |
- // TODO(sky): Expose a better way to determine this rather than assuming the |
- // parent is a toplevel container. |
- aura::Window* window = widget->GetNativeWindow(); |
- if (!window->parent()) |
- return true; |
- |
- ui::LayerAnimator* parent_layer_animator = |
- window->parent()->layer()->GetAnimator(); |
- return !parent_layer_animator->IsAnimatingProperty( |
- ui::LayerAnimationElement::OPACITY) && |
- !parent_layer_animator->IsAnimatingProperty( |
- ui::LayerAnimationElement::VISIBILITY); |
+ return true; |
} |
-} // namespace ash |
+} // namespace wm |
+} // namespace mash |