OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/wm/lock_state_controller.h" | 5 #include "ash/wm/lock_state_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/accessibility_delegate.h" | 9 #include "ash/accessibility_delegate.h" |
10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 } | 160 } |
161 | 161 |
162 LockStateController::LockStateController() | 162 LockStateController::LockStateController() |
163 : animator_(new internal::SessionStateAnimator()), | 163 : animator_(new internal::SessionStateAnimator()), |
164 login_status_(user::LOGGED_IN_NONE), | 164 login_status_(user::LOGGED_IN_NONE), |
165 system_is_locked_(false), | 165 system_is_locked_(false), |
166 shutting_down_(false), | 166 shutting_down_(false), |
167 shutdown_after_lock_(false), | 167 shutdown_after_lock_(false), |
168 animating_lock_(false), | 168 animating_lock_(false), |
169 can_cancel_lock_animation_(false) { | 169 can_cancel_lock_animation_(false) { |
170 Shell::GetPrimaryRootWindow()->GetDispatcher()->AddRootWindowObserver(this); | 170 Shell::GetPrimaryRootWindow()->GetHost()->dispatcher()->AddRootWindowObserver( |
| 171 this); |
171 } | 172 } |
172 | 173 |
173 LockStateController::~LockStateController() { | 174 LockStateController::~LockStateController() { |
174 Shell::GetPrimaryRootWindow()->GetDispatcher()->RemoveRootWindowObserver( | 175 Shell::GetPrimaryRootWindow()->GetHost()->dispatcher()-> |
175 this); | 176 RemoveRootWindowObserver(this); |
176 } | 177 } |
177 | 178 |
178 void LockStateController::SetDelegate(LockStateControllerDelegate* delegate) { | 179 void LockStateController::SetDelegate(LockStateControllerDelegate* delegate) { |
179 delegate_.reset(delegate); | 180 delegate_.reset(delegate); |
180 } | 181 } |
181 | 182 |
182 void LockStateController::AddObserver(LockStateObserver* observer) { | 183 void LockStateController::AddObserver(LockStateObserver* observer) { |
183 observers_.AddObserver(observer); | 184 observers_.AddObserver(observer); |
184 } | 185 } |
185 | 186 |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 unlocked_properties_->background_is_hidden) { | 673 unlocked_properties_->background_is_hidden) { |
673 animator_->StartAnimationWithObserver( | 674 animator_->StartAnimationWithObserver( |
674 internal::SessionStateAnimator::DESKTOP_BACKGROUND, | 675 internal::SessionStateAnimator::DESKTOP_BACKGROUND, |
675 internal::SessionStateAnimator::ANIMATION_FADE_OUT, | 676 internal::SessionStateAnimator::ANIMATION_FADE_OUT, |
676 speed, | 677 speed, |
677 observer); | 678 observer); |
678 } | 679 } |
679 } | 680 } |
680 | 681 |
681 } // namespace ash | 682 } // namespace ash |
OLD | NEW |