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

Side by Side Diff: extensions/common/api/runtime.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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // Note: Many of these functions and events are implemented by hand and should 5 // Note: Many of these functions and events are implemented by hand and should
6 // not elicit any code generation from the schema compiler. These items are 6 // not elicit any code generation from the schema compiler. These items are
7 // marked "nocompile." 7 // marked "nocompile."
8 [ 8 [
9 { 9 {
10 "namespace": "runtime", 10 "namespace": "runtime",
(...skipping 26 matching lines...) Expand all
37 "properties": { 37 "properties": {
38 "tab": {"$ref": "tabs.Tab", "optional": true, "description": "The $(re f:tabs.Tab) which opened the connection, if any. This property will <strong>only </strong> be present when the connection was opened from a tab (including conten t scripts), and <strong>only</strong> if the receiver is an extension, not an ap p.", "extension_types": ["extension", "legacy_packaged_app"]}, 38 "tab": {"$ref": "tabs.Tab", "optional": true, "description": "The $(re f:tabs.Tab) which opened the connection, if any. This property will <strong>only </strong> be present when the connection was opened from a tab (including conten t scripts), and <strong>only</strong> if the receiver is an extension, not an ap p.", "extension_types": ["extension", "legacy_packaged_app"]},
39 "frameId": {"type": "integer", "optional": true, "description": "The < a href='webNavigation#frame_ids'>frame</a> that opened the connection. 0 for top -level frames, positive for child frames. This will only be set when <code>tab</ code> is set.", "extension_types": ["extension", "legacy_packaged_app"]}, 39 "frameId": {"type": "integer", "optional": true, "description": "The < a href='webNavigation#frame_ids'>frame</a> that opened the connection. 0 for top -level frames, positive for child frames. This will only be set when <code>tab</ code> is set.", "extension_types": ["extension", "legacy_packaged_app"]},
40 "guestProcessId": {"type": "integer", "optional": true, "nodoc": true, "description": "The guest process id of the requesting webview, if available. O nly available for component extensions.", "extension_types": ["extension"]}, 40 "guestProcessId": {"type": "integer", "optional": true, "nodoc": true, "description": "The guest process id of the requesting webview, if available. O nly available for component extensions.", "extension_types": ["extension"]},
41 "id": {"type": "string", "optional": true, "description": "The ID of t he extension or app that opened the connection, if any."}, 41 "id": {"type": "string", "optional": true, "description": "The ID of t he extension or app that opened the connection, if any."},
42 "url": {"type": "string", "optional": true, "description": "The URL of the page or frame that opened the connection. If the sender is in an iframe, it will be iframe's URL not the URL of the page which hosts it."}, 42 "url": {"type": "string", "optional": true, "description": "The URL of the page or frame that opened the connection. If the sender is in an iframe, it will be iframe's URL not the URL of the page which hosts it."},
43 "tlsChannelId": {"type": "string", "optional": true, "description": "T he TLS channel ID of the page or frame that opened the connection, if requested by the extension or app, and if available."} 43 "tlsChannelId": {"type": "string", "optional": true, "description": "T he TLS channel ID of the page or frame that opened the connection, if requested by the extension or app, and if available."}
44 } 44 }
45 }, 45 },
46 { 46 {
47 "id": "PlatformOs",
48 "type": "string",
49 "description": "The operating system chrome is running on.",
50 "enum": ["mac", "win", "android", "cros", "linux", "openbsd"]
51 },
52 {
53 "id": "PlatformArch",
54 "type": "string",
55 "enum": ["arm", "x86-32", "x86-64"],
56 "description": "The machine's processor architecture."
57 },
58 {
59 "id": "PlatformNaclArch",
60 "description": "The native client architecture. This may be different fr om arch on some platforms.",
61 "type": "string",
62 "enum": ["arm", "x86-32", "x86-64"]
63 },
64 {
47 "id": "PlatformInfo", 65 "id": "PlatformInfo",
48 "type": "object", 66 "type": "object",
49 "description": "An object containing information about the current platf orm.", 67 "description": "An object containing information about the current platf orm.",
50 "properties": { 68 "properties": {
51 "os": { 69 "os": {
52 "type": "string", 70 "$ref": "PlatformOs",
53 "description": "The operating system chrome is running on.", 71 "description": "The operating system chrome is running on."
54 "enum": ["mac", "win", "android", "cros", "linux", "openbsd"]
55 }, 72 },
56 "arch": { 73 "arch": {
57 "type": "string", 74 "$ref": "PlatformArch",
58 "enum": ["arm", "x86-32", "x86-64"],
59 "description": "The machine's processor architecture." 75 "description": "The machine's processor architecture."
60 }, 76 },
61 "nacl_arch" : { 77 "nacl_arch" : {
62 "description": "The native client architecture. This may be differen t from arch on some platforms.", 78 "description": "The native client architecture. This may be differen t from arch on some platforms.",
63 "type": "string", 79 "$ref": "PlatformNaclArch"
64 "enum": ["arm", "x86-32", "x86-64"]
65 } 80 }
66 } 81 }
82 },
83 {
84 "id": "RequestUpdateCheckStatus",
85 "type": "string",
86 "enum": ["throttled", "no_update", "update_available"],
87 "description": "Result of the update check."
88 },
89 {
90 "id": "OnInstalledReason",
91 "type": "string",
92 "enum": ["install", "update", "chrome_update", "shared_module_update"],
93 "description": "The reason that this event is being dispatched."
94 },
95 {
96 "id": "OnRestartRequiredReason",
97 "type": "string",
98 "description": "The reason that the event is being dispatched. 'app_upda te' is used when the restart is needed because the application is updated to a n ewer version. 'os_update' is used when the restart is needed because the browser /OS is updated to a newer version. 'periodic' is used when the system runs for m ore than the permitted uptime set in the enterprise policy.",
99 "enum": ["app_update", "os_update", "periodic"]
67 } 100 }
68 ], 101 ],
69 "properties": { 102 "properties": {
70 "lastError": { 103 "lastError": {
71 "type": "object", 104 "type": "object",
72 "optional": true, 105 "optional": true,
73 "description": "This will be defined during an API method callback if th ere was an error", 106 "description": "This will be defined during an API method callback if th ere was an error",
74 "properties": { 107 "properties": {
75 "message": { 108 "message": {
76 "optional": true, 109 "optional": true,
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 "name": "requestUpdateCheck", 204 "name": "requestUpdateCheck",
172 "type": "function", 205 "type": "function",
173 "description": "Requests an update check for this app/extension.", 206 "description": "Requests an update check for this app/extension.",
174 "parameters": [ 207 "parameters": [
175 { 208 {
176 "type": "function", 209 "type": "function",
177 "name": "callback", 210 "name": "callback",
178 "parameters": [ 211 "parameters": [
179 { 212 {
180 "name": "status", 213 "name": "status",
181 "type": "string", 214 "$ref": "RequestUpdateCheckStatus",
182 "enum": ["throttled", "no_update", "update_available"],
183 "description": "Result of the update check." 215 "description": "Result of the update check."
184 }, 216 },
185 { 217 {
186 "name": "details", 218 "name": "details",
187 "type": "object", 219 "type": "object",
188 "optional": true, 220 "optional": true,
189 "properties": { 221 "properties": {
190 "version": { 222 "version": {
191 "type": "string", 223 "type": "string",
192 "description": "The version of the available update." 224 "description": "The version of the available update."
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 { 389 {
358 "name": "onInstalled", 390 "name": "onInstalled",
359 "type": "function", 391 "type": "function",
360 "description": "Fired when the extension is first installed, when the ex tension is updated to a new version, and when Chrome is updated to a new version .", 392 "description": "Fired when the extension is first installed, when the ex tension is updated to a new version, and when Chrome is updated to a new version .",
361 "parameters": [ 393 "parameters": [
362 { 394 {
363 "type": "object", 395 "type": "object",
364 "name": "details", 396 "name": "details",
365 "properties": { 397 "properties": {
366 "reason": { 398 "reason": {
367 "type": "string", 399 "$ref": "OnInstalledReason",
368 "enum": ["install", "update", "chrome_update", "shared_module_up date"],
369 "description": "The reason that this event is being dispatched." 400 "description": "The reason that this event is being dispatched."
370 }, 401 },
371 "previousVersion": { 402 "previousVersion": {
372 "type": "string", 403 "type": "string",
373 "optional": true, 404 "optional": true,
374 "description": "Indicates the previous version of the extension, which has just been updated. This is present only if 'reason' is 'update'." 405 "description": "Indicates the previous version of the extension, which has just been updated. This is present only if 'reason' is 'update'."
375 }, 406 },
376 "id": { 407 "id": {
377 "type": "string", 408 "type": "string",
378 "optional": true, 409 "optional": true,
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 "optional": true, 506 "optional": true,
476 "description": "Return true from the event listener if you wish to cal l <code>sendResponse</code> after the event listener returns." 507 "description": "Return true from the event listener if you wish to cal l <code>sendResponse</code> after the event listener returns."
477 } 508 }
478 }, 509 },
479 { 510 {
480 "name": "onRestartRequired", 511 "name": "onRestartRequired",
481 "type": "function", 512 "type": "function",
482 "description": "Fired when an app or the device that it runs on needs to be restarted. The app should close all its windows at its earliest convenient t ime to let the restart to happen. If the app does nothing, a restart will be enf orced after a 24-hour grace period has passed. Currently, this event is only fir ed for Chrome OS kiosk apps.", 513 "description": "Fired when an app or the device that it runs on needs to be restarted. The app should close all its windows at its earliest convenient t ime to let the restart to happen. If the app does nothing, a restart will be enf orced after a 24-hour grace period has passed. Currently, this event is only fir ed for Chrome OS kiosk apps.",
483 "parameters": [ 514 "parameters": [
484 { 515 {
485 "type": "string", 516 "$ref": "OnRestartRequiredReason",
486 "name": "reason", 517 "name": "reason",
487 "description": "The reason that the event is being dispatched. 'app_ update' is used when the restart is needed because the application is updated to a newer version. 'os_update' is used when the restart is needed because the bro wser/OS is updated to a newer version. 'periodic' is used when the system runs f or more than the permitted uptime set in the enterprise policy.", 518 "description": "The reason that the event is being dispatched."
488 "enum": ["app_update", "os_update", "periodic"]
489 } 519 }
490 ] 520 ]
491 } 521 }
492 ] 522 ]
493 } 523 }
494 ] 524 ]
OLDNEW
« no previous file with comments | « extensions/common/api/management.json ('k') | extensions/common/api/virtual_keyboard_private.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698