Update CrOS OOBE throbber to MD throbber; delete old asset
[chromium-blink-merge.git] / chrome / common / extensions / api / types.json
blobcc59b8ef4c2405077a016c54d8467d6e8642173b
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
3 // found in the LICENSE file.
6   {
7     "namespace": "types",
8     "description": "The <code>chrome.types</code> API contains type declarations for Chrome.",
9     "types": [
10       {
11         "id": "ChromeSettingScope",
12         "type": "string",
13         "enum": ["regular", "regular_only", "incognito_persistent", "incognito_session_only"],
14         "description": "The scope of the ChromeSetting. One of<ul><li><var>regular</var>: setting for the regular profile (which is inherited by the incognito profile if not overridden elsewhere),</li><li><var>regular_only</var>: setting for the regular profile only (not inherited by the incognito profile),</li><li><var>incognito_persistent</var>: setting for the incognito profile that survives browser restarts (overrides regular preferences),</li><li><var>incognito_session_only</var>: setting for the incognito profile that can only be set during an incognito session and is deleted when the incognito session ends (overrides regular and incognito_persistent preferences).</li></ul>"
15       },
16       {
17         "id": "LevelOfControl",
18         "type": "string",
19         "enum": ["not_controllable", "controlled_by_other_extensions", "controllable_by_this_extension", "controlled_by_this_extension"],
20         "description": "One of<ul><li><var>not_controllable</var>: cannot be controlled by any extension</li><li><var>controlled_by_other_extensions</var>: controlled by extensions with higher precedence</li><li><var>controllable_by_this_extension</var>: can be controlled by this extension</li><li><var>controlled_by_this_extension</var>: controlled by this extension</li></ul>"
21       },
22       {
23         "id": "ChromeSetting",
24         "type": "object",
25         "js_module": "ChromeSetting",
26         "customBindings": "ChromeSetting",
27         "description": "An interface that allows access to a Chrome browser setting. See $(ref:accessibilityFeatures) for an example.",
28         "functions": [
29           {
30             "name": "get",
31             "type": "function",
32             "nocompile": true,
33             "description": "Gets the value of a setting.",
34             "parameters": [
35               {
36                 "name": "details",
37                 "type": "object",
38                 "description": "Which setting to consider.",
39                 "properties": {
40                   "incognito": {
41                     "type": "boolean",
42                     "optional": true,
43                     "description": "Whether to return the value that applies to the incognito session (default false)."
44                   }
45                 }
46               },
47               {
48                 "name": "callback",
49                 "type": "function",
50                 "parameters": [
51                   {
52                     "name": "details",
53                     "type": "object",
54                     "description": "Details of the currently effective value.",
55                     "properties": {
56                       "value": {
57                         "description": "The value of the setting.",
58                         "type": "any"
59                       },
60                       "levelOfControl": {
61                         "$ref": "LevelOfControl",
62                         "description": "The level of control of the setting."
63                       },
64                       "incognitoSpecific": {
65                         "description": "Whether the effective value is specific to the incognito session.<br/>This property will <em>only</em> be present if the <var>incognito</var> property in the <var>details</var> parameter of <code>get()</code> was true.",
66                         "type": "boolean",
67                         "optional": true
68                       }
69                     }
70                   }
71                 ]
72               }
73             ]
74           },
75           {
76             "name": "set",
77             "type": "function",
78             "nocompile": true,
79             "description": "Sets the value of a setting.",
80             "parameters": [
81               {
82                 "name": "details",
83                 "type": "object",
84                 "description": "Which setting to change.",
85                 "properties": {
86                   "value": {
87                     "description": "The value of the setting. <br/>Note that every setting has a specific value type, which is described together with the setting. An extension should <em>not</em> set a value of a different type.",
88                     "type": "any"
89                   },
90                   "scope": {
91                     "$ref": "ChromeSettingScope",
92                     "optional": true,
93                     "description": "Where to set the setting (default: regular)."
94                   }
95                 }
96               },
97               {
98                 "name": "callback",
99                 "type": "function",
100                 "description": "Called at the completion of the set operation.",
101                 "optional": true,
102                 "parameters": []
103               }
104             ]
105           },
106           {
107             "name": "clear",
108             "type": "function",
109             "nocompile": true,
110             "description": "Clears the setting, restoring any default value.",
111             "parameters": [
112               {
113                 "name": "details",
114                 "type": "object",
115                 "description": "Which setting to clear.",
116                 "properties": {
117                   "scope": {
118                     "$ref": "ChromeSettingScope",
119                     "optional": true,
120                     "description": "Where to clear the setting (default: regular)."
121                   }
122                 }
123               },
124               {
125                 "name": "callback",
126                 "type": "function",
127                 "description": "Called at the completion of the clear operation.",
128                 "optional": true,
129                 "parameters": []
130               }
131             ]
132           }
133         ],
134         "events": [
135           {
136             "name": "onChange",
137             "description": "Fired after the setting changes.",
138             "parameters": [
139               {
140                 "type": "object",
141                 "name": "details",
142                 "properties": {
143                   "value": {
144                     "description": "The value of the setting after the change.",
145                     "type": "any"
146                   },
147                   "levelOfControl": {
148                     "$ref": "LevelOfControl",
149                     "description": "The level of control of the setting."
150                   },
151                   "incognitoSpecific": {
152                     "description": "Whether the value that has changed is specific to the incognito session.<br/>This property will <em>only</em> be present if the user has enabled the extension in incognito mode.",
153                     "type": "boolean",
154                     "optional": true
155                   }
156                 }
157               }
158             ]
159           }
160         ]
161       }
162     ]
163   }