blob: 0333fbc18ce92c69561e669abf380039099883e4 [file] [log] [blame]
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/base/idle/idle.h"
namespace ui {
IdleState CalculateIdleState(int idle_threshold) {
if (CheckIdleStateIsLocked())
return IDLE_STATE_LOCKED;
if (CalculateIdleTime() >= idle_threshold)
return IDLE_STATE_IDLE;
return IDLE_STATE_ACTIVE;
}
} // namespace ui