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 #include <string> | 8 #include <string> |
| 9 #include <utility> |
9 | 10 |
10 #include "ash/accessibility_delegate.h" | 11 #include "ash/accessibility_delegate.h" |
11 #include "ash/ash_switches.h" | 12 #include "ash/ash_switches.h" |
12 #include "ash/cancel_mode.h" | 13 #include "ash/cancel_mode.h" |
13 #include "ash/metrics/user_metrics_recorder.h" | 14 #include "ash/metrics/user_metrics_recorder.h" |
14 #include "ash/shell.h" | 15 #include "ash/shell.h" |
15 #include "ash/shell_delegate.h" | 16 #include "ash/shell_delegate.h" |
16 #include "ash/shell_window_ids.h" | 17 #include "ash/shell_window_ids.h" |
17 #include "ash/wm/session_state_animator.h" | 18 #include "ash/wm/session_state_animator.h" |
18 #include "ash/wm/session_state_animator_impl.h" | 19 #include "ash/wm/session_state_animator_impl.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 weak_ptr_factory_(this) { | 92 weak_ptr_factory_(this) { |
92 Shell::GetPrimaryRootWindow()->GetHost()->AddObserver(this); | 93 Shell::GetPrimaryRootWindow()->GetHost()->AddObserver(this); |
93 } | 94 } |
94 | 95 |
95 LockStateController::~LockStateController() { | 96 LockStateController::~LockStateController() { |
96 Shell::GetPrimaryRootWindow()->GetHost()->RemoveObserver(this); | 97 Shell::GetPrimaryRootWindow()->GetHost()->RemoveObserver(this); |
97 } | 98 } |
98 | 99 |
99 void LockStateController::SetDelegate( | 100 void LockStateController::SetDelegate( |
100 scoped_ptr<LockStateControllerDelegate> delegate) { | 101 scoped_ptr<LockStateControllerDelegate> delegate) { |
101 delegate_ = delegate.Pass(); | 102 delegate_ = std::move(delegate); |
102 } | 103 } |
103 | 104 |
104 void LockStateController::AddObserver(LockStateObserver* observer) { | 105 void LockStateController::AddObserver(LockStateObserver* observer) { |
105 observers_.AddObserver(observer); | 106 observers_.AddObserver(observer); |
106 } | 107 } |
107 | 108 |
108 void LockStateController::RemoveObserver(LockStateObserver* observer) { | 109 void LockStateController::RemoveObserver(LockStateObserver* observer) { |
109 observers_.RemoveObserver(observer); | 110 observers_.RemoveObserver(observer); |
110 } | 111 } |
111 | 112 |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 if (unlocked_properties_.get() && | 602 if (unlocked_properties_.get() && |
602 unlocked_properties_->background_is_hidden) { | 603 unlocked_properties_->background_is_hidden) { |
603 animation_sequence->StartAnimation( | 604 animation_sequence->StartAnimation( |
604 SessionStateAnimator::DESKTOP_BACKGROUND, | 605 SessionStateAnimator::DESKTOP_BACKGROUND, |
605 SessionStateAnimator::ANIMATION_FADE_OUT, | 606 SessionStateAnimator::ANIMATION_FADE_OUT, |
606 speed); | 607 speed); |
607 } | 608 } |
608 } | 609 } |
609 | 610 |
610 } // namespace ash | 611 } // namespace ash |
OLD | NEW |