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

Side by Side Diff: ash/display/output_configurator_animation.h

Issue 10817028: Add Fade-out/Fade-in animation during output-configuration change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 "base/timer.h"
12 #include "chromeos/display/output_configurator.h"
13
14 namespace aura {
15 class RootWindow;
16 } // namespace aura
17
18 namespace ui {
19 class Layer;
20 } // namespace ui
21
22 namespace ash {
23 namespace internal {
24
25 // OutputConfiguratorAnimation provides the visual effects for
26 // chromeos::OutputConfigurator, such like fade-out/in during changing
27 // the display mode.
28 class OutputConfiguratorAnimation
29 : public chromeos::OutputConfigurator::AnimationDelegate {
30 public:
31 OutputConfiguratorAnimation();
32 virtual ~OutputConfiguratorAnimation();
33
34 protected:
35 // chromeos::OutputConfigurator::AnimationDelegate overrides:
36 virtual void WillDisplayModeChange(base::Closure callback) OVERRIDE;
37 virtual void OnDisplayModeChanged() OVERRIDE;
38
39 private:
40 // Clears all hiding layers. Note that in case that this method is called
41 // during an animation, the method call will cancel all of the animations
42 // and *not* call the registered callback.
43 void ClearHidingLayers();
44
45 std::map<aura::RootWindow*, ui::Layer*> hiding_layers_;
46 scoped_ptr<base::OneShotTimer<OutputConfiguratorAnimation> > timer_;
47
48 DISALLOW_COPY_AND_ASSIGN(OutputConfiguratorAnimation);
49 };
50
51 } // namespace internal
52 } // namespace ash
53
54 #endif // ASH_DISPLAY_OUTPUT_CONFIGURATION_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698