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/display/display_error_dialog.h" |
7 #include "ash/shell.h" | 8 #include "ash/shell.h" |
8 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
9 #include "base/bind.h" | 10 #include "base/bind.h" |
10 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
11 #include "base/time.h" | 12 #include "base/time.h" |
12 #include "ui/aura/root_window.h" | 13 #include "ui/aura/root_window.h" |
13 #include "ui/aura/window.h" | 14 #include "ui/aura/window.h" |
14 #include "ui/compositor/layer.h" | 15 #include "ui/compositor/layer.h" |
15 #include "ui/compositor/layer_animation_observer.h" | 16 #include "ui/compositor/layer_animation_observer.h" |
16 #include "ui/compositor/layer_animation_sequence.h" | 17 #include "ui/compositor/layer_animation_sequence.h" |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 } | 203 } |
203 | 204 |
204 void OutputConfiguratorAnimation::OnDisplayModeChanged() { | 205 void OutputConfiguratorAnimation::OnDisplayModeChanged() { |
205 if (!hiding_layers_.empty()) | 206 if (!hiding_layers_.empty()) |
206 StartFadeInAnimation(); | 207 StartFadeInAnimation(); |
207 } | 208 } |
208 | 209 |
209 void OutputConfiguratorAnimation::OnDisplayModeChangeFailed() { | 210 void OutputConfiguratorAnimation::OnDisplayModeChangeFailed() { |
210 if (!hiding_layers_.empty()) | 211 if (!hiding_layers_.empty()) |
211 StartFadeInAnimation(); | 212 StartFadeInAnimation(); |
| 213 DisplayErrorDialog::ShowDialog(); |
212 } | 214 } |
213 | 215 |
214 void OutputConfiguratorAnimation::ClearHidingLayers() { | 216 void OutputConfiguratorAnimation::ClearHidingLayers() { |
215 if (timer_.get()) { | 217 if (timer_.get()) { |
216 timer_->Stop(); | 218 timer_->Stop(); |
217 timer_.reset(); | 219 timer_.reset(); |
218 } | 220 } |
219 STLDeleteContainerPairSecondPointers( | 221 STLDeleteContainerPairSecondPointers( |
220 hiding_layers_.begin(), hiding_layers_.end()); | 222 hiding_layers_.begin(), hiding_layers_.end()); |
221 hiding_layers_.clear(); | 223 hiding_layers_.clear(); |
222 } | 224 } |
223 | 225 |
224 } // namespace internal | 226 } // namespace internal |
225 } // namespace ash | 227 } // namespace ash |
OLD | NEW |