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 "base/basictypes.h"
10 #include "chrome/browser/idle_query_x11.h"
13 #if !defined(USE_AURA)
14 #include "chrome/browser/screensaver_window_finder_gtk.h"
17 void CalculateIdleTime(IdleTimeCallback notify
) {
19 chrome::IdleQueryX11 idle_query
;
20 notify
.Run(idle_query
.IdleTime());
24 bool CheckIdleStateIsLocked() {
25 // Usually the screensaver is used to lock the screen, so we do not need to
26 // check if the workstation is locked.
30 return ScreensaverWindowFinder::ScreensaverWindowExists();