| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/display/output_configurator_animation.h" | 5 #include "ash/display/output_configurator_animation.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 ui::ScopedLayerAnimationSettings settings(hiding_layer->GetAnimator()); | 196 ui::ScopedLayerAnimationSettings settings(hiding_layer->GetAnimator()); |
| 197 settings.SetTransitionDuration(base::TimeDelta::FromMilliseconds( | 197 settings.SetTransitionDuration(base::TimeDelta::FromMilliseconds( |
| 198 kFadingAnimationDurationInMS)); | 198 kFadingAnimationDurationInMS)); |
| 199 observer->AddNewAnimator(hiding_layer->GetAnimator()); | 199 observer->AddNewAnimator(hiding_layer->GetAnimator()); |
| 200 hiding_layer->SetOpacity(0.0f); | 200 hiding_layer->SetOpacity(0.0f); |
| 201 hiding_layer->SetVisible(false); | 201 hiding_layer->SetVisible(false); |
| 202 } | 202 } |
| 203 } | 203 } |
| 204 | 204 |
| 205 void OutputConfiguratorAnimation::OnDisplayModeChanged( | 205 void OutputConfiguratorAnimation::OnDisplayModeChanged( |
| 206 const ui::OutputConfigurator::DisplayStateList& outputs) { | 206 const ui::DisplayConfigurator::DisplayStateList& outputs) { |
| 207 if (!hiding_layers_.empty()) | 207 if (!hiding_layers_.empty()) |
| 208 StartFadeInAnimation(); | 208 StartFadeInAnimation(); |
| 209 } | 209 } |
| 210 | 210 |
| 211 void OutputConfiguratorAnimation::OnDisplayModeChangeFailed( | 211 void OutputConfiguratorAnimation::OnDisplayModeChangeFailed( |
| 212 ui::OutputState failed_new_state) { | 212 ui::OutputState failed_new_state) { |
| 213 if (!hiding_layers_.empty()) | 213 if (!hiding_layers_.empty()) |
| 214 StartFadeInAnimation(); | 214 StartFadeInAnimation(); |
| 215 } | 215 } |
| 216 | 216 |
| 217 void OutputConfiguratorAnimation::ClearHidingLayers() { | 217 void OutputConfiguratorAnimation::ClearHidingLayers() { |
| 218 if (timer_) { | 218 if (timer_) { |
| 219 timer_->Stop(); | 219 timer_->Stop(); |
| 220 timer_.reset(); | 220 timer_.reset(); |
| 221 } | 221 } |
| 222 STLDeleteContainerPairSecondPointers( | 222 STLDeleteContainerPairSecondPointers( |
| 223 hiding_layers_.begin(), hiding_layers_.end()); | 223 hiding_layers_.begin(), hiding_layers_.end()); |
| 224 hiding_layers_.clear(); | 224 hiding_layers_.clear(); |
| 225 } | 225 } |
| 226 | 226 |
| 227 } // namespace ash | 227 } // namespace ash |
| OLD | NEW |