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.
?2013 Google
このページは大阪弁化フィルタによって翻訳生成されたんですわ。 |
Description: |
Use the chrome.idle API to detect when the machine's idle state changes.
|
Availability: |
Stable since Chrome 6.
|
Permissions: |
"idle"
|
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(enum of or"active"
or"idle"
or"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.