Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: chrome/browser/idle.h

Issue 8702009: Add device status reports to policy requests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove some now-dead code. Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/policy/browser_policy_connector.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_IDLE_H_ 5 #ifndef CHROME_BROWSER_IDLE_H_
6 #define CHROME_BROWSER_IDLE_H_ 6 #define CHROME_BROWSER_IDLE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 10
11 enum IdleState { 11 enum IdleState {
12 IDLE_STATE_ACTIVE = 0, 12 IDLE_STATE_ACTIVE = 0,
13 IDLE_STATE_IDLE = 1, // No activity within threshold. 13 IDLE_STATE_IDLE = 1, // No activity within threshold.
14 IDLE_STATE_LOCKED = 2, // Only available on supported systems. 14 IDLE_STATE_LOCKED = 2, // Only available on supported systems.
15 IDLE_STATE_UNKNOWN = 3 // Used when waiting for the Idle state or in error 15 IDLE_STATE_UNKNOWN = 3 // Used when waiting for the Idle state or in error
16 // conditions 16 // conditions
17 }; 17 };
18 18
19 // For MacOSX, InitIdleMonitor needs to be called first to setup the monitor. 19 // For MacOSX, InitIdleMonitor needs to be called first to setup the monitor.
20 // StopIdleMonitor should be called if it is not needed any more. 20 // StopIdleMonitor should be called if it is not needed any more.
21 #if defined(OS_MACOSX) 21 #if defined(OS_MACOSX)
22 void InitIdleMonitor(); 22 void InitIdleMonitor();
23 void StopIdleMonitor(); 23 void StopIdleMonitor();
24 #endif 24 #endif
25 25
26 typedef base::Callback<void(IdleState)> IdleCallback; 26 typedef base::Callback<void(IdleState)> IdleCallback;
27 27
28 // Calculate the Idle state and notify the callback. 28 // Calculate the Idle state and notify the callback.
29 void CalculateIdleState(unsigned int idle_threshold, IdleCallback notify); 29 void CalculateIdleState(unsigned int idle_threshold, IdleCallback notify);
30 30
31 // Checks synchronously if Idle state is IDLE_STATE_LOCKED. 31 // Checks synchronously if Idle state is IDLE_STATE_LOCKED.
32 bool CheckIdleStateIsLocked(); 32 bool CheckIdleStateIsLocked();
33 #endif // CHROME_BROWSER_IDLE_H_ 33 #endif // CHROME_BROWSER_IDLE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/policy/browser_policy_connector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698