OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "components/mus/ws/user_activity_monitor.h" | 5 #include "services/ui/ws/user_activity_monitor.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/time/default_tick_clock.h" | 8 #include "base/time/default_tick_clock.h" |
9 | 9 |
10 namespace mus { | 10 namespace mus { |
11 namespace ws { | 11 namespace ws { |
12 | 12 |
13 UserActivityMonitor::UserActivityMonitor(std::unique_ptr<base::TickClock> clock) | 13 UserActivityMonitor::UserActivityMonitor(std::unique_ptr<base::TickClock> clock) |
14 : now_clock_(std::move(clock)) { | 14 : now_clock_(std::move(clock)) { |
15 if (!now_clock_) | 15 if (!now_clock_) |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 idle_observers_.erase(std::remove_if( | 125 idle_observers_.erase(std::remove_if( |
126 idle_observers_.begin(), idle_observers_.end(), | 126 idle_observers_.begin(), idle_observers_.end(), |
127 [observer]( | 127 [observer]( |
128 const std::pair<IdleObserverInfo, mojom::UserIdleObserverPtr>& pair) { | 128 const std::pair<IdleObserverInfo, mojom::UserIdleObserverPtr>& pair) { |
129 return pair.second.get() == observer; | 129 return pair.second.get() == observer; |
130 })); | 130 })); |
131 } | 131 } |
132 | 132 |
133 } // namespace ws | 133 } // namespace ws |
134 } // namespace mus | 134 } // namespace mus |
OLD | NEW |