summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/api/idle.json
blob: 03ad9af451f4c9ef81cb732b3bd047e0ddff6aa4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

[
  {
    "namespace": "idle",
    "types": [],
    "functions": [
      {
        "name": "queryState",
        "type": "function",
        "description": "Returns the current state of the browser.",
        "parameters": [
          {
            "name": "thresholdSeconds",
            "type": "integer",
            "minimum": 15,
            "description": "Threshold, in seconds, used to determine when a machine is in the idle state."
          },
          {
            "name": "callback",
            "type": "function",
            "parameters": [
              {
                "name": "newState",
                "type": "string",
                "enum": ["active", "idle", "locked"]
              }
            ]
          }
        ]
      }
    ],
    "events": [
      {
        "name": "onStateChanged",
        "type": "function",
        "description": "Fired when the browser changes to an active state.  Currently only reports the transition from idle to active.",
        "parameters": [
          {
            "name": "newState",
            "type": "string",
            "enum": ["active"]
          }
        ]
      }
    ]
  }
]