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

Side by Side Diff: extensions/common/api/idle.json

Issue 1055673002: [Extensions API] Remove inline enums (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 5 years, 8 months 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
« no previous file with comments | « extensions/common/api/extension_types.json ('k') | extensions/common/api/management.json » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 [ 5 [
6 { 6 {
7 "namespace": "idle", 7 "namespace": "idle",
8 "description": "Use the <code>chrome.idle</code> API to detect when the mach ine's idle state changes.", 8 "description": "Use the <code>chrome.idle</code> API to detect when the mach ine's idle state changes.",
9 "types": [], 9 "types": [
10 {
11 "id": "IdleState",
12 "type": "string",
13 "enum": ["active", "idle", "locked"]
14 }
15 ],
10 "functions": [ 16 "functions": [
11 { 17 {
12 "name": "queryState", 18 "name": "queryState",
13 "type": "function", 19 "type": "function",
14 "description": "Returns \"locked\" if the system is locked, \"idle\" if the user has not generated any input for a specified number of seconds, or \"act ive\" otherwise.", 20 "description": "Returns \"locked\" if the system is locked, \"idle\" if the user has not generated any input for a specified number of seconds, or \"act ive\" otherwise.",
15 "parameters": [ 21 "parameters": [
16 { 22 {
17 "name": "detectionIntervalInSeconds", 23 "name": "detectionIntervalInSeconds",
18 "type": "integer", 24 "type": "integer",
19 "minimum": 15, 25 "minimum": 15,
20 "description": "The system is considered idle if detectionIntervalIn Seconds seconds have elapsed since the last user input detected." 26 "description": "The system is considered idle if detectionIntervalIn Seconds seconds have elapsed since the last user input detected."
21 }, 27 },
22 { 28 {
23 "name": "callback", 29 "name": "callback",
24 "type": "function", 30 "type": "function",
25 "parameters": [ 31 "parameters": [
26 { 32 {
27 "name": "newState", 33 "name": "newState",
28 "type": "string", 34 "$ref": "IdleState"
29 "enum": ["active", "idle", "locked"]
30 } 35 }
31 ] 36 ]
32 } 37 }
33 ] 38 ]
34 }, 39 },
35 { 40 {
36 "name": "setDetectionInterval", 41 "name": "setDetectionInterval",
37 "type": "function", 42 "type": "function",
38 "description": "Sets the interval, in seconds, used to determine when th e system is in an idle state for onStateChanged events. The default interval is 60 seconds.", 43 "description": "Sets the interval, in seconds, used to determine when th e system is in an idle state for onStateChanged events. The default interval is 60 seconds.",
39 "parameters": [ 44 "parameters": [
40 { 45 {
41 "name": "intervalInSeconds", 46 "name": "intervalInSeconds",
42 "type": "integer", 47 "type": "integer",
43 "minimum": 15, 48 "minimum": 15,
44 "description": "Threshold, in seconds, used to determine when the sy stem is in an idle state." 49 "description": "Threshold, in seconds, used to determine when the sy stem is in an idle state."
45 } 50 }
46 ] 51 ]
47 } 52 }
48 ], 53 ],
49 "events": [ 54 "events": [
50 { 55 {
51 "name": "onStateChanged", 56 "name": "onStateChanged",
52 "type": "function", 57 "type": "function",
53 "description": "Fired when the system changes to an active, idle or lock ed state. The event fires with \"locked\" if the screen is locked or the screens aver activates, \"idle\" if the system is unlocked and the user has not generate d any input for a specified number of seconds, and \"active\" when the user gene rates input on an idle system.", 58 "description": "Fired when the system changes to an active, idle or lock ed state. The event fires with \"locked\" if the screen is locked or the screens aver activates, \"idle\" if the system is unlocked and the user has not generate d any input for a specified number of seconds, and \"active\" when the user gene rates input on an idle system.",
54 "parameters": [ 59 "parameters": [
55 { 60 {
56 "name": "newState", 61 "name": "newState",
57 "type": "string", 62 "$ref": "IdleState"
58 "enum": ["active", "idle", "locked"]
59 } 63 }
60 ] 64 ]
61 } 65 }
62 ] 66 ]
63 } 67 }
64 ] 68 ]
OLDNEW
« no previous file with comments | « extensions/common/api/extension_types.json ('k') | extensions/common/api/management.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698