Revert r196089 "Add default values for Latin script font prefs."
[chromium-blink-merge.git] / chrome / browser / idle_linux.cc
blob2b670ec9da1d2623eb08a071d341b36aeb66e99c
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"
9 #if defined(USE_X11)
10 #include "chrome/browser/idle_query_x11.h"
11 #endif
13 #if !defined(USE_AURA)
14 #include "chrome/browser/screensaver_window_finder_gtk.h"
15 #endif
17 void CalculateIdleTime(IdleTimeCallback notify) {
18 #if defined(USE_X11)
19 chrome::IdleQueryX11 idle_query;
20 notify.Run(idle_query.IdleTime());
21 #endif
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.
27 #if defined(USE_AURA)
28 return false;
29 #else
30 return ScreensaverWindowFinder::ScreensaverWindowExists();
31 #endif