OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/ui/ash/multi_user/user_switch_animator_chromeos.h" | 5 #include "chrome/browser/ui/ash/multi_user/user_switch_animator_chromeos.h" |
6 | 6 |
7 #include "ash/desktop_background/user_wallpaper_delegate.h" | 7 #include "ash/desktop_background/user_wallpaper_delegate.h" |
8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
9 #include "ash/shelf/shelf_layout_manager.h" | 9 #include "ash/shelf/shelf_layout_manager.h" |
10 #include "ash/shelf/shelf_widget.h" | 10 #include "ash/shelf/shelf_widget.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 } | 133 } |
134 | 134 |
135 // static | 135 // static |
136 bool UserSwitchAnimatorChromeOS::CoversScreen(aura::Window* window) { | 136 bool UserSwitchAnimatorChromeOS::CoversScreen(aura::Window* window) { |
137 // Full screen covers the screen naturally. Since a normal window can have the | 137 // Full screen covers the screen naturally. Since a normal window can have the |
138 // same size as the work area, we only compare the bounds against the work | 138 // same size as the work area, we only compare the bounds against the work |
139 // area. | 139 // area. |
140 if (ash::wm::GetWindowState(window)->IsFullscreen()) | 140 if (ash::wm::GetWindowState(window)->IsFullscreen()) |
141 return true; | 141 return true; |
142 gfx::Rect bounds = window->GetBoundsInRootWindow(); | 142 gfx::Rect bounds = window->GetBoundsInRootWindow(); |
143 gfx::Rect work_area = gfx::Screen::GetScreenFor(window)-> | 143 gfx::Rect work_area = |
144 GetDisplayNearestWindow(window).work_area(); | 144 gfx::Screen::GetScreen()->GetDisplayNearestWindow(window).work_area(); |
145 bounds.Intersect(work_area); | 145 bounds.Intersect(work_area); |
146 return work_area == bounds; | 146 return work_area == bounds; |
147 } | 147 } |
148 | 148 |
149 void UserSwitchAnimatorChromeOS::AdvanceUserTransitionAnimation() { | 149 void UserSwitchAnimatorChromeOS::AdvanceUserTransitionAnimation() { |
150 DCHECK_NE(animation_step_, ANIMATION_STEP_ENDED); | 150 DCHECK_NE(animation_step_, ANIMATION_STEP_ENDED); |
151 | 151 |
152 TransitionWallpaper(animation_step_); | 152 TransitionWallpaper(animation_step_); |
153 TransitionUserShelf(animation_step_); | 153 TransitionUserShelf(animation_step_); |
154 TransitionWindows(animation_step_); | 154 TransitionWindows(animation_step_); |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 if (itr != window_to_entry_map.end()) { | 446 if (itr != window_to_entry_map.end()) { |
447 windows_by_account_id_[itr->second->show_for_user()].push_back( | 447 windows_by_account_id_[itr->second->show_for_user()].push_back( |
448 child_window); | 448 child_window); |
449 } | 449 } |
450 } | 450 } |
451 } | 451 } |
452 } | 452 } |
453 } | 453 } |
454 | 454 |
455 } // namespace chrome | 455 } // namespace chrome |
OLD | NEW |