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

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: fix compile errors, hopefully 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
Index: ash/wm/session_state_animator.cc
diff --git a/ash/wm/session_state_animator.cc b/ash/wm/session_state_animator.cc
index 55f3fa13393fbfc9d684d6e49a8ff8c38ac7f363..b3026a6b5605dd1623e9f2b85da4ef7831c5aecf 100644
--- a/ash/wm/session_state_animator.cc
+++ b/ash/wm/session_state_animator.cc
@@ -202,11 +202,6 @@ class ForegroundDropAnimationObserver : 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;
@@ -250,16 +245,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 |
@@ -272,11 +257,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|.
@@ -389,40 +372,6 @@ void SessionStateAnimator::StartAnimation(int container_mask,
}
}
-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;

Powered by Google App Engine
This is Rietveld 408576698