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

Side by Side Diff: ash/desktop_background/desktop_background_view.cc

Issue 14756019: Adding new user menu section to the SystemTrayMenu & refactoring of user access (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More windows breakages addressed Created 7 years, 7 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
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/desktop_background/desktop_background_view.h" 5 #include "ash/desktop_background/desktop_background_view.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "ash/ash_export.h" 9 #include "ash/ash_export.h"
10 #include "ash/desktop_background/desktop_background_controller.h" 10 #include "ash/desktop_background/desktop_background_controller.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 views::corewm::SetWindowVisibilityAnimationType( 194 views::corewm::SetWindowVisibilityAnimationType(
195 desktop_widget->GetNativeView(), animation_type); 195 desktop_widget->GetNativeView(), animation_type);
196 196
197 // Enable wallpaper transition for the following cases: 197 // Enable wallpaper transition for the following cases:
198 // 1. Initial(OOBE) wallpaper animation. 198 // 1. Initial(OOBE) wallpaper animation.
199 // 2. Wallpaper fades in from a non empty background. 199 // 2. Wallpaper fades in from a non empty background.
200 // 3. From an empty background, chrome transit to a logged in user session. 200 // 3. From an empty background, chrome transit to a logged in user session.
201 // 4. From an empty background, guest user logged in. 201 // 4. From an empty background, guest user logged in.
202 if (wallpaper_delegate->ShouldShowInitialAnimation() || 202 if (wallpaper_delegate->ShouldShowInitialAnimation() ||
203 root_window->GetProperty(kAnimatingDesktopController) || 203 root_window->GetProperty(kAnimatingDesktopController) ||
204 Shell::GetInstance()->session_state_delegate()->HasActiveUser()) { 204 Shell::GetInstance()->session_state_delegate()->NumberOfLoggedInUsers()) {
205 views::corewm::SetWindowVisibilityAnimationTransition( 205 views::corewm::SetWindowVisibilityAnimationTransition(
206 desktop_widget->GetNativeView(), views::corewm::ANIMATE_SHOW); 206 desktop_widget->GetNativeView(), views::corewm::ANIMATE_SHOW);
207 } else { 207 } else {
208 // Disable animation if transition to login screen from an empty background. 208 // Disable animation if transition to login screen from an empty background.
209 views::corewm::SetWindowVisibilityAnimationTransition( 209 views::corewm::SetWindowVisibilityAnimationTransition(
210 desktop_widget->GetNativeView(), views::corewm::ANIMATE_NONE); 210 desktop_widget->GetNativeView(), views::corewm::ANIMATE_NONE);
211 } 211 }
212 212
213 desktop_widget->SetBounds(params.parent->bounds()); 213 desktop_widget->SetBounds(params.parent->bounds());
214 ui::ScopedLayerAnimationSettings settings( 214 ui::ScopedLayerAnimationSettings settings(
215 desktop_widget->GetNativeView()->layer()->GetAnimator()); 215 desktop_widget->GetNativeView()->layer()->GetAnimator());
216 settings.SetPreemptionStrategy(ui::LayerAnimator::ENQUEUE_NEW_ANIMATION); 216 settings.SetPreemptionStrategy(ui::LayerAnimator::ENQUEUE_NEW_ANIMATION);
217 settings.AddObserver(new ShowWallpaperAnimationObserver( 217 settings.AddObserver(new ShowWallpaperAnimationObserver(
218 root_window, desktop_widget, 218 root_window, desktop_widget,
219 wallpaper_delegate->ShouldShowInitialAnimation())); 219 wallpaper_delegate->ShouldShowInitialAnimation()));
220 desktop_widget->Show(); 220 desktop_widget->Show();
221 desktop_widget->GetNativeView()->SetName("DesktopBackgroundView"); 221 desktop_widget->GetNativeView()->SetName("DesktopBackgroundView");
222 return desktop_widget; 222 return desktop_widget;
223 } 223 }
224 224
225 } // namespace internal 225 } // namespace internal
226 } // namespace ash 226 } // namespace ash
OLDNEW
« no previous file with comments | « ash/ash_strings.grd ('k') | ash/root_window_controller.cc » ('j') | ash/session_state_delegate.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698