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

Unified Diff: mash/wm/frame/header_painter_util.cc

Issue 1459653002: Gets mustash frames looking like that of ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update test Created 5 years, 1 month 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 | « mash/wm/frame/header_painter_util.h ('k') | mash/wm/frame/move_loop.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « mash/wm/frame/header_painter_util.h ('k') | mash/wm/frame/move_loop.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698