OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef ASH_DISPLAY_OUTPUT_CONFIGURATOR_ANIMATION_H_ |
| 6 #define ASH_DISPLAY_OUTPUT_CONFIGURATOR_ANIMATION_H_ |
| 7 |
| 8 #include <map> |
| 9 |
| 10 #include "base/callback.h" |
| 11 #include "chromeos/display/output_configurator.h" |
| 12 |
| 13 namespace aura { |
| 14 class RootWindow; |
| 15 } // namespace aura |
| 16 |
| 17 namespace ui { |
| 18 class Layer; |
| 19 } // namespace ui |
| 20 |
| 21 namespace ash { |
| 22 namespace internal { |
| 23 |
| 24 // OutputConfiguratorAnimation provides the visual effects for |
| 25 // chromeos::OutputConfigurator, such like fade-out/in during changing |
| 26 // the display mode. |
| 27 class OutputConfiguratorAnimation |
| 28 : public chromeos::OutputConfigurator::AnimationDelegate { |
| 29 public: |
| 30 OutputConfiguratorAnimation(); |
| 31 virtual ~OutputConfiguratorAnimation(); |
| 32 |
| 33 protected: |
| 34 // chromeos::OutputConfigurator::AnimationDelegate overrides: |
| 35 virtual void WillDisplayModeChange(base::Closure callback) OVERRIDE; |
| 36 virtual void OnDisplayModeChanged() OVERRIDE; |
| 37 |
| 38 private: |
| 39 // Clears all hiding layers. Note that in case that this method is called |
| 40 // during an animation, the method call will cancel all of the animations |
| 41 // and *not* call the registered callback. |
| 42 void ClearHidingLayers(); |
| 43 |
| 44 std::map<aura::RootWindow*, ui::Layer*> hiding_layers_; |
| 45 |
| 46 DISALLOW_COPY_AND_ASSIGN(OutputConfiguratorAnimation); |
| 47 }; |
| 48 |
| 49 } // namespace internal |
| 50 } // namespace ash |
| 51 |
| 52 #endif // ASH_DISPLAY_OUTPUT_CONFIGURATION_CONTROLLER_H_ |
OLD | NEW |