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

Side by Side Diff: ash/wm/session_state_animator.h

Issue 11276025: Add lock pod animation on unlock. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add comment Created 8 years, 1 month 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
« no previous file with comments | « no previous file | ash/wm/session_state_animator.cc » ('j') | ash/wm/session_state_animator.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef ASH_WM_SESSION_STATE_ANIMATOR_H_ 5 #ifndef ASH_WM_SESSION_STATE_ANIMATOR_H_
6 #define ASH_WM_SESSION_STATE_ANIMATOR_H_ 6 #define ASH_WM_SESSION_STATE_ANIMATOR_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/wm/workspace/colored_window_controller.h" 9 #include "ash/wm/workspace/colored_window_controller.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // Destroy |foreground_| when it is not needed anymore. 120 // Destroy |foreground_| when it is not needed anymore.
121 void DropForeground(); 121 void DropForeground();
122 122
123 // Drops back layer after |UNDO_SLOW_CLOSE| animation delay. 123 // Drops back layer after |UNDO_SLOW_CLOSE| animation delay.
124 void ScheduleDropBlackLayer(); 124 void ScheduleDropBlackLayer();
125 125
126 // Apply animation |type| to all containers included in |container_mask|. 126 // Apply animation |type| to all containers included in |container_mask|.
127 void StartAnimation(int container_mask, 127 void StartAnimation(int container_mask,
128 AnimationType type); 128 AnimationType type);
129 129
130 // Apply animation |type| to all containers included in |container_mask| and
131 // call a |callback| at the end of the animation, if it is not null.
132 void StartAnimation(int container_mask,
Daniel Erat 2012/10/25 15:45:58 i'd suggest naming this StartAnimationWithCallback
133 AnimationType type,
134 base::Callback<void(void)>& callback);
135
130 // Fills |containers| with the containers included in |container_mask|. 136 // Fills |containers| with the containers included in |container_mask|.
131 void GetContainers(int container_mask, 137 void GetContainers(int container_mask,
132 aura::Window::Windows* containers); 138 aura::Window::Windows* containers);
133 139
134 // aura::RootWindowObserver overrides: 140 // aura::RootWindowObserver overrides:
135 virtual void OnRootWindowResized(const aura::RootWindow* root, 141 virtual void OnRootWindowResized(const aura::RootWindow* root,
136 const gfx::Size& old_size) OVERRIDE; 142 const gfx::Size& old_size) OVERRIDE;
137 143
138 private: 144 private:
145 // Apply animation |type| to window |window| and add |observer| if it is not
146 // NULL to the last animation sequence.
147 void RunAnimationForWindow(aura::Window* window,
148 AnimationType type,
149 ui::LayerAnimationObserver* observer);
150
139 // Layer that's stacked under all of the root window's children to provide a 151 // Layer that's stacked under all of the root window's children to provide a
140 // black background when we're scaling all of the other windows down. 152 // black background when we're scaling all of the other windows down.
141 // TODO(derat): Remove this in favor of having the compositor only clear the 153 // TODO(derat): Remove this in favor of having the compositor only clear the
142 // viewport when there are regions not covered by a layer: 154 // viewport when there are regions not covered by a layer:
143 // http://crbug.com/113445 155 // http://crbug.com/113445
144 scoped_ptr<ui::Layer> black_layer_; 156 scoped_ptr<ui::Layer> black_layer_;
145 157
146 // White foreground that is used during shutdown animation to "fade 158 // White foreground that is used during shutdown animation to "fade
147 // everything into white". 159 // everything into white".
148 scoped_ptr<ColoredWindowController> foreground_; 160 scoped_ptr<ColoredWindowController> foreground_;
149 161
150 // Started when we abort the pre-lock state. When it fires, we hide 162 // Started when we abort the pre-lock state. When it fires, we hide
151 // |black_layer_|, as the desktop background is now covering the whole 163 // |black_layer_|, as the desktop background is now covering the whole
152 // screen. 164 // screen.
153 base::OneShotTimer<SessionStateAnimator> hide_black_layer_timer_; 165 base::OneShotTimer<SessionStateAnimator> hide_black_layer_timer_;
154 166
155 DISALLOW_COPY_AND_ASSIGN(SessionStateAnimator); 167 DISALLOW_COPY_AND_ASSIGN(SessionStateAnimator);
156 }; 168 };
157 169
158 } // namespace internal 170 } // namespace internal
159 } // namespace ash 171 } // namespace ash
160 172
161 #endif // ASH_WM_SESSION_STATE_ANIMATOR_H_ 173 #endif // ASH_WM_SESSION_STATE_ANIMATOR_H_
OLDNEW
« no previous file with comments | « no previous file | ash/wm/session_state_animator.cc » ('j') | ash/wm/session_state_animator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698