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

Side by Side Diff: chrome/common/extensions/api/types.json

Issue 1055673002: [Extensions API] Remove inline enums (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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": "types", 7 "namespace": "types",
8 "description": "The <code>chrome.types</code> API contains type declarations for Chrome.", 8 "description": "The <code>chrome.types</code> API contains type declarations for Chrome.",
9 "types": [ 9 "types": [
10 { 10 {
11 "id": "ChromeSettingScope",
12 "type": "string",
13 "enum": ["regular", "regular_only", "incognito_persistent", "incognito_s ession_only"],
14 "description": "The scope of the ChromeSetting. One of<ul><li><var>regul ar</var>: setting for the regular profile (which is inherited by the incognito p rofile if not overridden elsewhere),</li><li><var>regular_only</var>: setting fo r the regular profile only (not inherited by the incognito profile),</li><li><va r>incognito_persistent</var>: setting for the incognito profile that survives br owser restarts (overrides regular preferences),</li><li><var>incognito_session_o nly</var>: setting for the incognito profile that can only be set during an inco gnito 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", "controll able_by_this_extension", "controlled_by_this_extension"],
20 "description": "One of<ul><li><var>not_controllable</var>: cannot be con trolled by any extension</li><li><var>controlled_by_other_extensions</var>: cont rolled by extensions with higher precedence</li><li><var>controllable_by_this_ex tension</var>: can be controlled by this extension</li><li><var>controlled_by_th is_extension</var>: controlled by this extension</li></ul>"
21 },
22 {
11 "id": "ChromeSetting", 23 "id": "ChromeSetting",
12 "type": "object", 24 "type": "object",
13 "js_module": "ChromeSetting", 25 "js_module": "ChromeSetting",
14 "customBindings": "ChromeSetting", 26 "customBindings": "ChromeSetting",
15 "description": "An interface that allows access to a Chrome browser sett ing. See $(ref:accessibilityFeatures) for an example.", 27 "description": "An interface that allows access to a Chrome browser sett ing. See $(ref:accessibilityFeatures) for an example.",
16 "functions": [ 28 "functions": [
17 { 29 {
18 "name": "get", 30 "name": "get",
19 "type": "function", 31 "type": "function",
20 "nocompile": true, 32 "nocompile": true,
(...skipping 18 matching lines...) Expand all
39 { 51 {
40 "name": "details", 52 "name": "details",
41 "type": "object", 53 "type": "object",
42 "description": "Details of the currently effective value.", 54 "description": "Details of the currently effective value.",
43 "properties": { 55 "properties": {
44 "value": { 56 "value": {
45 "description": "The value of the setting.", 57 "description": "The value of the setting.",
46 "type": "any" 58 "type": "any"
47 }, 59 },
48 "levelOfControl": { 60 "levelOfControl": {
49 "description": "One of<ul><li><var>not_controllable</var >: cannot be controlled by any extension</li><li><var>controlled_by_other_extens ions</var>: controlled by extensions with higher precedence</li><li><var>control lable_by_this_extension</var>: can be controlled by this extension</li><li><var> controlled_by_this_extension</var>: controlled by this extension</li></ul>", 61 "$ref": "LevelOfControl",
50 "type": "string", 62 "description": "The level of control of the setting."
51 "enum": ["not_controllable", "controlled_by_other_extens ions", "controllable_by_this_extension", "controlled_by_this_extension"]
52 }, 63 },
53 "incognitoSpecific": { 64 "incognitoSpecific": {
54 "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.", 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.",
55 "type": "boolean", 66 "type": "boolean",
56 "optional": true 67 "optional": true
57 } 68 }
58 } 69 }
59 } 70 }
60 ] 71 ]
61 } 72 }
62 ] 73 ]
63 }, 74 },
64 { 75 {
65 "name": "set", 76 "name": "set",
66 "type": "function", 77 "type": "function",
67 "nocompile": true, 78 "nocompile": true,
68 "description": "Sets the value of a setting.", 79 "description": "Sets the value of a setting.",
69 "parameters": [ 80 "parameters": [
70 { 81 {
71 "name": "details", 82 "name": "details",
72 "type": "object", 83 "type": "object",
73 "description": "Which setting to change.", 84 "description": "Which setting to change.",
74 "properties": { 85 "properties": {
75 "value": { 86 "value": {
76 "description": "The value of the setting. <br/>Note that eve ry setting has a specific value type, which is described together with the setti ng. An extension should <em>not</em> set a value of a different type.", 87 "description": "The value of the setting. <br/>Note that eve ry setting has a specific value type, which is described together with the setti ng. An extension should <em>not</em> set a value of a different type.",
77 "type": "any" 88 "type": "any"
78 }, 89 },
79 "scope": { 90 "scope": {
80 "type": "string", 91 "$ref": "ChromeSettingScope",
81 "enum": ["regular", "regular_only", "incognito_persistent", "incognito_session_only"],
82 "optional": true, 92 "optional": true,
83 "description": "Where to set the setting (default: regular). One of<ul><li><var>regular</var>: setting for the regular profile (which is inh erited by the incognito profile if not overridden elsewhere),</li><li><var>regul ar_only</var>: setting for the regular profile only (not inherited by the incogn ito 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 o nly be set during an incognito session and is deleted when the incognito session ends (overrides regular and incognito_persistent preferences).</li></ul>" 93 "description": "Where to set the setting (default: regular). "
84 } 94 }
85 } 95 }
86 }, 96 },
87 { 97 {
88 "name": "callback", 98 "name": "callback",
89 "type": "function", 99 "type": "function",
90 "description": "Called at the completion of the set operation.", 100 "description": "Called at the completion of the set operation.",
91 "optional": true, 101 "optional": true,
92 "parameters": [] 102 "parameters": []
93 } 103 }
94 ] 104 ]
95 }, 105 },
96 { 106 {
97 "name": "clear", 107 "name": "clear",
98 "type": "function", 108 "type": "function",
99 "nocompile": true, 109 "nocompile": true,
100 "description": "Clears the setting, restoring any default value.", 110 "description": "Clears the setting, restoring any default value.",
101 "parameters": [ 111 "parameters": [
102 { 112 {
103 "name": "details", 113 "name": "details",
104 "type": "object", 114 "type": "object",
105 "description": "Which setting to clear.", 115 "description": "Which setting to clear.",
106 "properties": { 116 "properties": {
107 "scope": { 117 "scope": {
108 "type": "string", 118 "$ref": "ChromeSettingScope",
109 "enum": ["regular", "regular_only", "incognito_persistent", "incognito_session_only"],
110 "optional": true, 119 "optional": true,
111 "description": "Where to clear the setting (default: regular ). One of<ul><li><var>regular</var>: setting for the regular profile (which is i nherited by the incognito profile if not overridden elsewhere),</li><li><var>reg ular_only</var>: setting for the regular profile only (not inherited by the inco gnito profile),</li><li><var>incognito_persistent</var>: setting for the incogni to 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 sessi on ends (overrides regular and incognito_persistent preferences).</li></ul>" 120 "description": "Where to clear the setting (default: regular )."
112 } 121 }
113 } 122 }
114 }, 123 },
115 { 124 {
116 "name": "callback", 125 "name": "callback",
117 "type": "function", 126 "type": "function",
118 "description": "Called at the completion of the clear operation. ", 127 "description": "Called at the completion of the clear operation. ",
119 "optional": true, 128 "optional": true,
120 "parameters": [] 129 "parameters": []
121 } 130 }
122 ] 131 ]
123 } 132 }
124 ], 133 ],
125 "events": [ 134 "events": [
126 { 135 {
127 "name": "onChange", 136 "name": "onChange",
128 "description": "Fired after the setting changes.", 137 "description": "Fired after the setting changes.",
129 "parameters": [ 138 "parameters": [
130 { 139 {
131 "type": "object", 140 "type": "object",
132 "name": "details", 141 "name": "details",
133 "properties": { 142 "properties": {
134 "value": { 143 "value": {
135 "description": "The value of the setting after the change.", 144 "description": "The value of the setting after the change.",
136 "type": "any" 145 "type": "any"
137 }, 146 },
138 "levelOfControl": { 147 "levelOfControl": {
139 "description": "One of<ul><li><var>not_controllable</var>: c annot be controlled by any extension</li><li><var>controlled_by_other_extensions </var>: controlled by extensions with higher precedence</li><li><var>controllabl e_by_this_extension</var>: can be controlled by this extension</li><li><var>cont rolled_by_this_extension</var>: controlled by this extension</li></ul>", 148 "$ref": "LevelOfControl",
140 "type": "string", 149 "description": "The level of control of the setting."
141 "enum": ["not_controllable", "controlled_by_other_extensions ", "controllable_by_this_extension", "controlled_by_this_extension"]
142 }, 150 },
143 "incognitoSpecific": { 151 "incognitoSpecific": {
144 "description": "Whether the value that has changed is specif ic to the incognito session.<br/>This property will <em>only</em> be present if the user has enabled the extension in incognito mode.", 152 "description": "Whether the value that has changed is specif ic to the incognito session.<br/>This property will <em>only</em> be present if the user has enabled the extension in incognito mode.",
145 "type": "boolean", 153 "type": "boolean",
146 "optional": true 154 "optional": true
147 } 155 }
148 } 156 }
149 } 157 }
150 ] 158 ]
151 } 159 }
152 ] 160 ]
153 } 161 }
154 ] 162 ]
155 } 163 }
156 ] 164 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698