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

Side by Side Diff: chrome/common/extensions/api/experimental.declarative.json

Issue 9309044: Supporting more APIs with json_schema_compiler (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: a few comments, fixes Created 8 years, 10 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
(Empty)
1 [
2 {
3 "namespace": "experimental.declarative",
4 "compile": true,
5 "types": [
6 {
7 "id": "Rule",
8 "type": "object",
9 "description": "Description of a declarative rule for handling events.",
10 "properties": {
11 "id": {
12 "type": "string",
13 "optional": true,
14 "description": "Optional identifier that allows referencing this rul e."
15 },
16 "conditions": {
17 "type": "array",
18 "items": {"type": "any"},
19 "description": "List of conditions that can trigger the actions."
20 },
21 "actions": {
22 "type": "array",
23 "items": {"type": "any"},
24 "description": "List of actions that are triggered if one of the con dtions is fulfilled."
25 },
26 "priority": {
27 "type": "integer",
28 "optional": true,
29 "description": "Optional priority of this rule. Defaults to 100."
30 }
31 }
32 }
33 ],
34 "functions": [
35 {
36 "name": "addRules",
37 "type": "function",
38 "description": "Registers rules to handle events.",
39 "parameters": [
40 {
41 "name": "event",
42 "type": "string",
43 "description": "Name of the event this function affects."
44 },
45 {
46 "name": "rules",
47 "type": "array",
48 "items": {"$ref": "Rule"},
49 "description": "Rules to be registered. These do not replace previou sly registered rules."
50 },
51 {
52 "name": "callback",
53 "optional": true,
54 "type": "function",
55 "parameters": [
56 {
57 "name": "rules",
58 "type": "array",
59 "items": {"$ref": "Rule"},
60 "description": "Rules that were registered, the optional paramet ers are filled with values."
61 }
62 ],
63 "description": "Called with registered rules."
64 }
65 ]
66 },
67 {
68 "name": "getRules",
69 "type": "function",
70 "description": "Returns currently registered rules.",
71 "parameters": [
72 {
73 "name": "event",
74 "type": "string",
75 "description": "Name of the event this function affects."
76 },
77 {
78 "name": "ruleIdentifiers",
79 "type": "array",
80 "items": {"type": "string"},
81 "description": "If non-empty, only rules with identifiers contained in this array are returned."
82 },
83 {
84 "name": "callback",
85 "type": "function",
86 "parameters": [
87 {
88 "name": "rules",
89 "type": "array",
90 "items": {"$ref": "Rule"},
91 "description": "Rules that were registered, the optional paramet ers are filled with values."
92 }
93 ],
94 "description": "Called with registered rules."
95 }
96 ]
97 },
98 {
99 "name": "removeRules",
100 "type": "function",
101 "description": "Unregisters currently registered rules.",
102 "parameters": [
103 {
104 "name": "event",
105 "type": "string",
106 "description": "Name of the event this function affects."
107 },
108 {
109 "name": "ruleIdentifiers",
110 "type": "array",
111 "items": {"type": "string"},
112 "description": "If non-empty, only rules with identifiers contained in this array are unregistered."
113 },
114 {
115 "name": "callback",
116 "optional": true,
117 "type": "function",
118 "parameters": [],
119 "description": "Called when rules were unregistered."
120 }
121 ]
122 }
123 ]
124 }
125 ]
126
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698