Fix build break
[chromium-blink-merge.git] / chrome / browser / idle_chromeos.cc
blob7977c411d8a970aaef49722376d67b06ac276b90
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/idle.h"
7 #include "ash/shell.h"
8 #include "ash/wm/user_activity_detector.h"
9 #include "base/time.h"
11 void CalculateIdleTime(IdleTimeCallback notify) {
12 base::TimeDelta idle_time = base::TimeTicks::Now() -
13 ash::Shell::GetInstance()->user_activity_detector()->last_activity_time();
14 notify.Run(static_cast<int>(idle_time.InSeconds()));
17 bool CheckIdleStateIsLocked() {
18 return ash::Shell::GetInstance()->IsScreenLocked();