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

Unified Diff: ash/wm/session_state_animator.cc

Issue 11273059: ash: Clean up system background layer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: apply review feedback Created 8 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 | « ash/wm/session_state_animator.h ('k') | ash/wm/session_state_controller_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/session_state_animator.cc
diff --git a/ash/wm/session_state_animator.cc b/ash/wm/session_state_animator.cc
index d69599791a0a58ec9d4083471fb272a87df5a105..fcc78e54b0c13a34056ad764c07d3b2c6dc04fe6 100644
--- a/ash/wm/session_state_animator.cc
+++ b/ash/wm/session_state_animator.cc
@@ -245,11 +245,6 @@ class CallbackAnimationObserver : public ui::LayerAnimationObserver {
} // namespace
-void SessionStateAnimator::TestApi::TriggerHideBlackLayerTimeout() {
- animator_->DropBlackLayer();
- animator_->hide_black_layer_timer_.Stop();
-}
-
bool SessionStateAnimator::TestApi::ContainersAreAnimated(
int container_mask, AnimationType type) const {
aura::Window::Windows containers;
@@ -293,16 +288,6 @@ bool SessionStateAnimator::TestApi::ContainersAreAnimated(
return true;
}
-bool SessionStateAnimator::TestApi::BlackLayerIsVisible() const {
- return animator_->black_layer_.get() &&
- animator_->black_layer_->visible();
-}
-
-gfx::Rect SessionStateAnimator::TestApi::GetBlackLayerBounds() const {
- ui::Layer* layer = animator_->black_layer_.get();
- return layer ? layer->bounds() : gfx::Rect();
-}
-
const int SessionStateAnimator::kAllLockScreenContainersMask =
SessionStateAnimator::LOCK_SCREEN_BACKGROUND |
SessionStateAnimator::LOCK_SCREEN_CONTAINERS |
@@ -315,11 +300,9 @@ const int SessionStateAnimator::kAllContainersMask =
SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS;
SessionStateAnimator::SessionStateAnimator() {
- Shell::GetPrimaryRootWindow()->AddRootWindowObserver(this);
}
SessionStateAnimator::~SessionStateAnimator() {
- Shell::GetPrimaryRootWindow()->RemoveRootWindowObserver(this);
}
// Fills |containers| with the containers described by |container_mask|.
@@ -454,40 +437,6 @@ void SessionStateAnimator::RunAnimationForWindow(
}
}
-void SessionStateAnimator::OnRootWindowResized(const aura::RootWindow* root,
- const gfx::Size& new_size) {
- if (black_layer_.get())
- black_layer_->SetBounds(gfx::Rect(root->bounds().size()));
-}
-
-void SessionStateAnimator::ShowBlackLayer() {
- if (hide_black_layer_timer_.IsRunning())
- hide_black_layer_timer_.Stop();
-
- if (!black_layer_.get()) {
- black_layer_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR));
- black_layer_->SetColor(SK_ColorBLACK);
-
- ui::Layer* root_layer = Shell::GetPrimaryRootWindow()->layer();
- black_layer_->SetBounds(root_layer->bounds());
- root_layer->Add(black_layer_.get());
- root_layer->StackAtBottom(black_layer_.get());
- }
- black_layer_->SetVisible(true);
-}
-
-void SessionStateAnimator::DropBlackLayer() {
- black_layer_.reset();
-}
-
-void SessionStateAnimator::ScheduleDropBlackLayer() {
- hide_black_layer_timer_.Stop();
- hide_black_layer_timer_.Start(
- FROM_HERE,
- base::TimeDelta::FromMilliseconds(kUndoSlowCloseAnimMs),
- this, &SessionStateAnimator::DropBlackLayer);
-}
-
void SessionStateAnimator::CreateForeground() {
if (foreground_.get())
return;
« no previous file with comments | « ash/wm/session_state_animator.h ('k') | ash/wm/session_state_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698