Home | History | Annotate | Download | only in browser
      1 // Copyright (c) 2010 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.
      4 
      5 #ifndef CHROME_BROWSER_IDLE_H_
      6 #define CHROME_BROWSER_IDLE_H_
      7 #pragma once
      8 
      9 enum IdleState {
     10   IDLE_STATE_ACTIVE = 0,
     11   IDLE_STATE_IDLE = 1,   // No activity within threshold.
     12   IDLE_STATE_LOCKED = 2  // Only available on supported systems.
     13 };
     14 
     15 // For MacOSX, InitIdleMonitor needs to be called first to setup the monitor.
     16 // StopIdleMonitor should be called if it is not needed any more.
     17 #if defined(OS_MACOSX)
     18 void InitIdleMonitor();
     19 void StopIdleMonitor();
     20 #endif
     21 
     22 IdleState CalculateIdleState(unsigned int idle_threshold);
     23 
     24 #endif  // CHROME_BROWSER_IDLE_H_
     25