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

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

Issue 9315010: RulesRegistry for declarative APIs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | Annotate | Revision Log
OLDNEW
1 [ 1 [
2 { 2 {
3 "namespace": "experimental.declarative", 3 "namespace": "experimental.declarative",
4 "types": [ 4 "types": [
5 { 5 {
6 "id": "Rule", 6 "id": "Rule",
7 "type": "object", 7 "type": "object",
8 "description": "Description of a declarative rule for handling events.", 8 "description": "Description of a declarative rule for handling events.",
9 "properties": { 9 "properties": {
10 "id": { 10 "id": {
(...skipping 10 matching lines...) Expand all
21 "type": "array", 21 "type": "array",
22 "items": {"type": "any"}, 22 "items": {"type": "any"},
23 "description": "List of actions that are triggered if one of the con dtions is fulfilled." 23 "description": "List of actions that are triggered if one of the con dtions is fulfilled."
24 }, 24 },
25 "priority": { 25 "priority": {
26 "type": "integer", 26 "type": "integer",
27 "optional": true, 27 "optional": true,
28 "description": "Optional priority of this rule. Defaults to 100." 28 "description": "Optional priority of this rule. Defaults to 100."
29 } 29 }
30 } 30 }
31 },
32 {
33 "nodoc": true,
34 "id": "TestCondition",
35 "type": "object",
36 "description": "Test condition for unit testing.",
37 "properties": {
38 "testParameter": {
39 "type": "string",
40 "description": "Optional test parameter",
41 "optional": true
42 },
43 "instanceType": { "type": "string", "enum": ["experimental.declarative .TestCondition"] }
44 }
45 },
46 {
47 "nodoc": true,
48 "id": "TestAction",
49 "type": "object",
50 "description": "Test action for unit testing.",
51 "properties": {
52 "testParameter": {
53 "type": "string",
54 "description": "Optional test parameter",
55 "optional": true
56 },
57 "instanceType": { "type": "string", "enum": ["experimental.declarative .TestAction"] }
58 }
31 } 59 }
32 ], 60 ],
33 "functions": [ 61 "functions": [
34 { 62 {
35 "name": "addRules", 63 "name": "addRules",
36 "type": "function", 64 "type": "function",
37 "description": "Registers rules to handle events.", 65 "description": "Registers rules to handle events.",
38 "parameters": [ 66 "parameters": [
39 { 67 {
40 "name": "event", 68 "name": "event",
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 }, 140 },
113 { 141 {
114 "name": "callback", 142 "name": "callback",
115 "optional": true, 143 "optional": true,
116 "type": "function", 144 "type": "function",
117 "parameters": [], 145 "parameters": [],
118 "description": "Called when rules were unregistered." 146 "description": "Called when rules were unregistered."
119 } 147 }
120 ] 148 ]
121 } 149 }
150 ],
151 "events": [
152 {
153 "nodoc": true,
154 "name": "testEvent",
155 "options": {
156 "supportsListeners": false,
157 "supportsRules": true,
158 "conditions": ["TestCondition"],
159 "actions": ["TestAction"]
160 }
161 }
122 ] 162 ]
123 } 163 }
124 ] 164 ]
125 165
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698