Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License, and code samples are licensed under the BSD License.
?2012 Google
このページは大阪弁化フィルタによって翻訳生成されたんですわ。 |
You must declare the "idle" permission in your extension's manifest to use the idle API. For example:
{ "name": "My extension", ... "permissions": [ "idle" ], ... }
Returns "locked" if the system is locked, "idle" if the user has not generated any input for a specified number of seconds, or "active" otherwise.
The callback parameter should specify a function that looks like this:
function(enumerated string ["active""idle""locked"] newState) {...};
Fired when the system changes to an active, idle or locked state. The event fires with "locked" if the screen is locked or the screensaver activates, "idle" if the system is unlocked and the user has not generated any input for a specified number of seconds, and "active" when the user generates input on an idle system.