1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
content / browser / screenlock_monitor / screenlock_monitor_source.cc [blame]
// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/screenlock_monitor/screenlock_monitor_source.h"
#include "content/browser/screenlock_monitor/screenlock_monitor.h"
namespace content {
ScreenlockMonitorSource::ScreenlockMonitorSource() = default;
ScreenlockMonitorSource::~ScreenlockMonitorSource() = default;
// static
void ScreenlockMonitorSource::ProcessScreenlockEvent(ScreenlockEvent event_id) {
ScreenlockMonitor* monitor = ScreenlockMonitor::Get();
if (!monitor) {
return;
}
switch (event_id) {
case SCREEN_LOCK_EVENT:
monitor->NotifyScreenLocked();
break;
case SCREEN_UNLOCK_EVENT:
monitor->NotifyScreenUnlocked();
break;
}
}
} // namespace content