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

Unified Diff: athena/wm/window_overview_mode.cc

Issue 455543004: Use ShadowController instead of creating its own. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 | « athena/wm/window_manager_impl.cc ('k') | ui/wm/core/shadow_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/wm/window_overview_mode.cc
diff --git a/athena/wm/window_overview_mode.cc b/athena/wm/window_overview_mode.cc
index 4cb5d2c87fe1b11f164bb1fc3b9e527bcb3f3569..91ee8c9e9bba06b6bd04c12d7d223010617d452f 100644
--- a/athena/wm/window_overview_mode.cc
+++ b/athena/wm/window_overview_mode.cc
@@ -25,7 +25,7 @@
#include "ui/events/gestures/fling_curve.h"
#include "ui/gfx/frame_time.h"
#include "ui/gfx/transform.h"
-#include "ui/wm/core/shadow.h"
+#include "ui/wm/core/shadow_types.h"
namespace {
@@ -39,8 +39,6 @@ struct WindowOverviewState {
// The current overview state of the window. 0.f means the window is at the
// topmost position. 1.f means the window is at the bottom-most position.
float progress;
-
- scoped_ptr<wm::Shadow> shadow;
};
} // namespace
@@ -76,6 +74,7 @@ void RestoreWindowState(aura::Window* window) {
ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
settings.SetTransitionDuration(base::TimeDelta::FromMilliseconds(250));
window->SetTransform(gfx::Transform());
+ wm::SetShadowType(window, wm::SHADOW_TYPE_NONE);
}
// Always returns the same target.
@@ -167,8 +166,8 @@ class WindowOverviewModeImpl : public WindowOverviewMode,
state->top = top_transform;
state->bottom = bottom_transform;
state->progress = 0.f;
- state->shadow = CreateShadowForWindow(window);
window->SetProperty(kWindowOverviewState, state);
+ wm::SetShadowType(window, wm::SHADOW_TYPE_RECTANGULAR_ALWAYS_ACTIVE);
}
}
@@ -206,15 +205,6 @@ class WindowOverviewModeImpl : public WindowOverviewMode,
}
}
- scoped_ptr<wm::Shadow> CreateShadowForWindow(aura::Window* window) {
- scoped_ptr<wm::Shadow> shadow(new wm::Shadow());
- shadow->Init(wm::Shadow::STYLE_ACTIVE);
- shadow->SetContentBounds(gfx::Rect(container_->bounds().size()));
- shadow->layer()->SetVisible(true);
- window->layer()->Add(shadow->layer());
- return shadow.Pass();
- }
-
aura::Window* SelectWindowAt(ui::LocatedEvent* event) {
CHECK_EQ(container_, event->target());
// Find the old targeter to find the target of the event.
« no previous file with comments | « athena/wm/window_manager_impl.cc ('k') | ui/wm/core/shadow_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698