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

Unified Diff: ash/common/frame/header_painter_util.cc

Issue 2215223003: Moves most frame related classes to ash/common/frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 years, 4 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 | « ash/common/frame/header_painter_util.h ('k') | ash/frame/caption_buttons/caption_button_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/frame/header_painter_util.cc
diff --git a/ash/frame/header_painter_util.cc b/ash/common/frame/header_painter_util.cc
similarity index 91%
rename from ash/frame/header_painter_util.cc
rename to ash/common/frame/header_painter_util.cc
index ab5b9d50900d3811d01bc97d887b58ccc7923640..dfd545455215b19481037c77e49c457bfb170a14 100644
--- a/ash/frame/header_painter_util.cc
+++ b/ash/common/frame/header_painter_util.cc
@@ -2,11 +2,12 @@
// 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 "ash/common/frame/header_painter_util.h"
#include <algorithm>
-#include "ui/aura/window.h"
+#include "ash/common/wm_lookup.h"
+#include "ash/common/wm_window.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_animator.h"
#include "ui/gfx/font_list.h"
@@ -82,12 +83,12 @@ bool HeaderPainterUtil::CanAnimateActivation(views::Widget* widget) {
// 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())
+ WmWindow* window = WmLookup::Get()->GetWindowForWidget(widget);
+ if (!window || !window->GetParent())
return true;
ui::LayerAnimator* parent_layer_animator =
- window->parent()->layer()->GetAnimator();
+ window->GetParent()->GetLayer()->GetAnimator();
return !parent_layer_animator->IsAnimatingProperty(
ui::LayerAnimationElement::OPACITY) &&
!parent_layer_animator->IsAnimatingProperty(
« no previous file with comments | « ash/common/frame/header_painter_util.h ('k') | ash/frame/caption_buttons/caption_button_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698