Revert 168224 - Update V8 to version 3.15.4.
[chromium-blink-merge.git] / chrome / browser / idle.h
blobdf6abd7659eb078535a8edd7b4eff8dc6544aea3
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 #ifndef CHROME_BROWSER_IDLE_H_
6 #define CHROME_BROWSER_IDLE_H_
8 #include "base/callback.h"
10 enum IdleState {
11 IDLE_STATE_ACTIVE = 0,
12 IDLE_STATE_IDLE = 1, // No activity within threshold.
13 IDLE_STATE_LOCKED = 2, // Only available on supported systems.
14 IDLE_STATE_UNKNOWN = 3 // Used when waiting for the Idle state or in error
15 // conditions
18 // For MacOSX, InitIdleMonitor needs to be called first to setup the monitor.
19 // StopIdleMonitor should be called if it is not needed any more.
20 #if defined(OS_MACOSX)
21 void InitIdleMonitor();
22 void StopIdleMonitor();
23 #endif
25 typedef base::Callback<void(IdleState)> IdleCallback;
27 // Calculate the Idle state and notify the callback.
28 void CalculateIdleState(unsigned int idle_threshold, IdleCallback notify);
30 // Checks synchronously if Idle state is IDLE_STATE_LOCKED.
31 bool CheckIdleStateIsLocked();
33 #endif // CHROME_BROWSER_IDLE_H_