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

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: rebase Created 8 years, 4 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
« no previous file with comments | « ash/ash.gyp ('k') | ash/display/output_configurator_animation.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/ash_export.h"
11 #include "base/callback.h"
12 #include "base/timer.h"
13 #include "chromeos/display/output_configurator.h"
14
15 namespace aura {
16 class RootWindow;
17 } // namespace aura
18
19 namespace ui {
20 class Layer;
21 } // namespace ui
22
23 namespace ash {
24 namespace internal {
25
26 // OutputConfiguratorAnimation provides the visual effects for
27 // chromeos::OutputConfigurator, such like fade-out/in during changing
28 // the display mode.
29 class ASH_EXPORT OutputConfiguratorAnimation
30 : public chromeos::OutputConfigurator::Observer {
31 public:
32 OutputConfiguratorAnimation();
33 virtual ~OutputConfiguratorAnimation();
34
35 // Starts the fade-out animation for the all root windows. It will
36 // call |callback| once all of the animations have finished.
37 void StartFadeOutAnimation(base::Closure callback);
38
39 // Starts the animation to clear the fade-out animation effect
40 // for the all root windows.
41 void StartFadeInAnimation();
42
43 protected:
44 // chromeos::OutputConfigurator::Observer overrides:
45 virtual void OnDisplayModeChanged() OVERRIDE;
46
47 private:
48 // Clears all hiding layers. Note that in case that this method is called
49 // during an animation, the method call will cancel all of the animations
50 // and *not* call the registered callback.
51 void ClearHidingLayers();
52
53 std::map<aura::RootWindow*, ui::Layer*> hiding_layers_;
54 scoped_ptr<base::OneShotTimer<OutputConfiguratorAnimation> > timer_;
55
56 DISALLOW_COPY_AND_ASSIGN(OutputConfiguratorAnimation);
57 };
58
59 } // namespace internal
60 } // namespace ash
61
62 #endif // ASH_DISPLAY_OUTPUT_CONFIGURATION_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/ash.gyp ('k') | ash/display/output_configurator_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698