1 // Copyright (c) 2011 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 "ui/base/idle/idle.h"
12 void CalculateIdleStateCallback(int idle_threshold
,
15 if (idle_time
>= idle_threshold
)
16 notify
.Run(IDLE_STATE_IDLE
);
18 notify
.Run(IDLE_STATE_ACTIVE
);
23 void CalculateIdleState(int idle_threshold
, IdleCallback notify
) {
24 if (CheckIdleStateIsLocked()) {
25 notify
.Run(IDLE_STATE_LOCKED
);
29 CalculateIdleTime(base::Bind(&CalculateIdleStateCallback
,