- Added search icon and search clear button in 1x and 2x. Screenshot: http://i.imgur...
[chromium-blink-merge.git] / chrome / browser / idle_linux.cc
blob28d203751e69434b067be871a457cdfd7c9aa0de
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(OS_CHROMEOS)
14 #include "chrome/browser/screensaver_window_finder_x11.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(OS_CHROMEOS)
28 return false;
29 #else
30 return ScreensaverWindowFinder::ScreensaverWindowExists();
31 #endif