tabGroups.json (6492B)
1 [ 2 { 3 "namespace": "manifest", 4 "types": [ 5 { 6 "$extend": "OptionalPermissionNoPrompt", 7 "choices": [ 8 { 9 "type": "string", 10 "enum": ["tabGroups"] 11 } 12 ] 13 } 14 ] 15 }, 16 { 17 "namespace": "tabGroups", 18 "description": "Use the browser.tabGroups API to interact with the browser's tab grouping system. You can use this API to modify, and rearrange tab groups.", 19 "permissions": ["tabGroups"], 20 "types": [ 21 { 22 "id": "Color", 23 "type": "string", 24 "description": "The group's color, using 'grey' spelling for compatibility with Chromium.", 25 "enum": [ 26 "blue", 27 "cyan", 28 "grey", 29 "green", 30 "orange", 31 "pink", 32 "purple", 33 "red", 34 "yellow" 35 ] 36 }, 37 { 38 "id": "TabGroup", 39 "type": "object", 40 "description": "State of a tab group inside of an open window.", 41 "properties": { 42 "collapsed": { 43 "type": "boolean", 44 "description": "Whether the tab group is collapsed or expanded in the tab strip." 45 }, 46 "color": { 47 "$ref": "Color", 48 "description": "User-selected color name for the tab group's label/icons." 49 }, 50 "id": { 51 "type": "integer", 52 "description": "Unique ID of the tab group." 53 }, 54 "title": { 55 "type": "string", 56 "optional": true, 57 "description": "User-defined name of the tab group." 58 }, 59 "windowId": { 60 "type": "integer", 61 "description": "Window that the tab group is in." 62 } 63 } 64 } 65 ], 66 "properties": { 67 "TAB_GROUP_ID_NONE": { 68 "value": -1, 69 "description": "An ID that represents the absence of a group." 70 } 71 }, 72 "functions": [ 73 { 74 "name": "get", 75 "type": "function", 76 "description": "Retrieves details about the specified group.", 77 "async": "callback", 78 "parameters": [ 79 { 80 "type": "integer", 81 "name": "groupId", 82 "minimum": 0 83 }, 84 { 85 "type": "function", 86 "name": "callback", 87 "parameters": [{ "name": "group", "$ref": "TabGroup" }] 88 } 89 ] 90 }, 91 { 92 "name": "move", 93 "type": "function", 94 "description": "Move a group within, or to another window.", 95 "async": "callback", 96 "parameters": [ 97 { 98 "type": "integer", 99 "name": "groupId", 100 "minimum": 0 101 }, 102 { 103 "type": "object", 104 "name": "moveProperties", 105 "properties": { 106 "index": { 107 "type": "integer", 108 "minimum": -1 109 }, 110 "windowId": { 111 "type": "integer", 112 "optional": true, 113 "minimum": 0 114 } 115 } 116 }, 117 { 118 "type": "function", 119 "name": "callback", 120 "parameters": [{ "name": "group", "$ref": "TabGroup" }] 121 } 122 ] 123 }, 124 { 125 "name": "query", 126 "type": "function", 127 "description": "Return all grups, or find groups with specified properties.", 128 "async": "callback", 129 "parameters": [ 130 { 131 "type": "object", 132 "name": "queryInfo", 133 "properties": { 134 "collapsed": { 135 "type": "boolean", 136 "optional": true 137 }, 138 "color": { 139 "$ref": "Color", 140 "optional": true 141 }, 142 "title": { 143 "type": "string", 144 "optional": true 145 }, 146 "windowId": { 147 "type": "integer", 148 "optional": true, 149 "minimum": -2 150 } 151 } 152 }, 153 { 154 "type": "function", 155 "name": "callback", 156 "parameters": [ 157 { 158 "name": "groups", 159 "type": "array", 160 "items": { "$ref": "TabGroup" } 161 } 162 ] 163 } 164 ] 165 }, 166 { 167 "name": "update", 168 "type": "function", 169 "description": "Modifies state of a specified group.", 170 "async": "callback", 171 "parameters": [ 172 { 173 "type": "integer", 174 "name": "groupId", 175 "minimum": 0 176 }, 177 { 178 "type": "object", 179 "name": "updateProperties", 180 "properties": { 181 "collapsed": { 182 "type": "boolean", 183 "optional": true 184 }, 185 "color": { 186 "$ref": "Color", 187 "optional": true 188 }, 189 "title": { 190 "type": "string", 191 "optional": true 192 } 193 } 194 }, 195 { 196 "type": "function", 197 "name": "callback", 198 "parameters": [{ "name": "group", "$ref": "TabGroup" }] 199 } 200 ] 201 } 202 ], 203 "events": [ 204 { 205 "name": "onCreated", 206 "type": "function", 207 "description": "Fired when a tab group is created.", 208 "parameters": [{ "$ref": "TabGroup", "name": "group" }] 209 }, 210 { 211 "name": "onMoved", 212 "type": "function", 213 "description": "Fired when a tab group is moved, within a window or to another window.", 214 "parameters": [{ "$ref": "TabGroup", "name": "group" }] 215 }, 216 { 217 "name": "onRemoved", 218 "type": "function", 219 "description": "Fired when a tab group is removed.", 220 "parameters": [ 221 { "$ref": "TabGroup", "name": "group" }, 222 { 223 "type": "object", 224 "name": "removeInfo", 225 "properties": { 226 "isWindowClosing": { 227 "type": "boolean", 228 "description": "True when the tab group is being closed because its window is being closed." 229 } 230 } 231 } 232 ] 233 }, 234 { 235 "name": "onUpdated", 236 "type": "function", 237 "description": "Fired when a tab group is updated.", 238 "parameters": [{ "$ref": "TabGroup", "name": "group" }] 239 } 240 ] 241 } 242 ]