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

Unified Diff: ash/wm/workspace/desktop_background_fade_controller.cc

Issue 99783005: Remove unused ColoredWindowController/DesktopBackgroundFadeController (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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/workspace/desktop_background_fade_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/desktop_background_fade_controller.cc
diff --git a/ash/wm/workspace/desktop_background_fade_controller.cc b/ash/wm/workspace/desktop_background_fade_controller.cc
deleted file mode 100644
index abbdf578c8f6ff1c0f9e8728567a8b4707caf166..0000000000000000000000000000000000000000
--- a/ash/wm/workspace/desktop_background_fade_controller.cc
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) 2012 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/wm/workspace/desktop_background_fade_controller.h"
-
-#include "ash/wm/window_animations.h"
-#include "ash/wm/workspace/colored_window_controller.h"
-#include "base/time/time.h"
-#include "ui/aura/window.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-DesktopBackgroundFadeController::DesktopBackgroundFadeController(
- aura::Window* parent,
- aura::Window* position_above,
- base::TimeDelta duration,
- Direction direction) {
- SkColor start_color, target_color;
- gfx::Tween::Type tween_type;
- if (direction == FADE_OUT) {
- start_color = SkColorSetARGB(0, 0, 0, 0);
- target_color = SK_ColorBLACK;
- tween_type = gfx::Tween::EASE_IN_OUT;
- } else {
- start_color = SK_ColorBLACK;
- target_color = SkColorSetARGB(0, 0, 0, 0);
- tween_type = gfx::Tween::EASE_IN_OUT;
- }
-
- window_controller_.reset(
- new ColoredWindowController(parent, "DesktopFade"));
-
- // Force the window to be directly on top of the desktop.
- aura::Window* fade_window = window_controller_->GetWidget()->GetNativeView();
- parent->StackChildBelow(fade_window, position_above);
- parent->StackChildAbove(fade_window, position_above);
- window_controller_->SetColor(start_color);
- views::corewm::SetWindowVisibilityAnimationTransition(
- window_controller_->GetWidget()->GetNativeView(),
- views::corewm::ANIMATE_NONE);
- window_controller_->GetWidget()->Show();
- {
- ui::ScopedLayerAnimationSettings scoped_setter(
- fade_window->layer()->GetAnimator());
- scoped_setter.AddObserver(this);
- scoped_setter.SetTweenType(tween_type);
- scoped_setter.SetTransitionDuration(duration);
- window_controller_->SetColor(target_color);
- }
-}
-
-DesktopBackgroundFadeController::~DesktopBackgroundFadeController() {
- StopObservingImplicitAnimations();
-}
-
-void DesktopBackgroundFadeController::OnImplicitAnimationsCompleted() {
- window_controller_.reset();
-}
-
-} // namespace internal
-} // namespace ash
« no previous file with comments | « ash/wm/workspace/desktop_background_fade_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698