1// This Source Code Form is subject to the terms of the Mozilla Public 2// License, v. 2.0. If a copy of the MPL was not distributed with this 3// file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 5[ 6 { 7 "namespace": "manifest", 8 "types": [ 9 { 10 "$extend": "Permission", 11 "choices": [{ 12 "type": "string", 13 "enum": [ 14 "theme" 15 ] 16 }] 17 }, 18 { 19 "id": "ThemeColor", 20 "choices": [ 21 { 22 "type": "string" 23 }, 24 { 25 "type": "array", 26 "minItems": 3, 27 "maxItems": 3, 28 "items": { 29 "type": "integer", 30 "minimum": 0, 31 "maximum": 255 32 } 33 }, 34 { 35 "type": "array", 36 "minItems": 4, 37 "maxItems": 4, 38 "items": { 39 "type": "number" 40 } 41 } 42 ] 43 }, 44 { 45 "id": "ThemeType", 46 "type": "object", 47 "properties": { 48 "images": { 49 "type": "object", 50 "optional": true, 51 "properties": { 52 "additional_backgrounds": { 53 "type": "array", 54 "items": { "$ref": "ImageDataOrExtensionURL" }, 55 "optional": true 56 }, 57 "headerURL": { 58 "$ref": "ImageDataOrExtensionURL", 59 "optional": true 60 }, 61 "theme_frame": { 62 "$ref": "ImageDataOrExtensionURL", 63 "optional": true 64 } 65 }, 66 "additionalProperties": { "$ref": "UnrecognizedProperty" } 67 }, 68 "colors": { 69 "type": "object", 70 "optional": true, 71 "properties": { 72 "tab_selected": { 73 "$ref": "ThemeColor", 74 "optional": true 75 }, 76 "accentcolor": { 77 "$ref": "ThemeColor", 78 "optional": true 79 }, 80 "frame": { 81 "$ref": "ThemeColor", 82 "optional": true 83 }, 84 "frame_inactive": { 85 "$ref": "ThemeColor", 86 "optional": true 87 }, 88 "textcolor": { 89 "$ref": "ThemeColor", 90 "optional": true 91 }, 92 "tab_background_text": { 93 "$ref": "ThemeColor", 94 "optional": true 95 }, 96 "tab_loading": { 97 "$ref": "ThemeColor", 98 "optional": true 99 }, 100 "tab_text": { 101 "$ref": "ThemeColor", 102 "optional": true 103 }, 104 "tab_line": { 105 "$ref": "ThemeColor", 106 "optional": true 107 }, 108 "toolbar": { 109 "$ref": "ThemeColor", 110 "optional": true 111 }, 112 "toolbar_text": { 113 "$ref": "ThemeColor", 114 "optional": true 115 }, 116 "bookmark_text": { 117 "$ref": "ThemeColor", 118 "optional": true 119 }, 120 "toolbar_field": { 121 "$ref": "ThemeColor", 122 "optional": true 123 }, 124 "toolbar_field_text": { 125 "$ref": "ThemeColor", 126 "optional": true 127 }, 128 "toolbar_field_border": { 129 "$ref": "ThemeColor", 130 "optional": true 131 }, 132 "toolbar_field_separator": { 133 "$ref": "ThemeColor", 134 "optional": true 135 }, 136 "toolbar_top_separator": { 137 "$ref": "ThemeColor", 138 "optional": true 139 }, 140 "toolbar_bottom_separator": { 141 "$ref": "ThemeColor", 142 "optional": true 143 }, 144 "toolbar_vertical_separator": { 145 "$ref": "ThemeColor", 146 "optional": true 147 }, 148 "icons": { 149 "$ref": "ThemeColor", 150 "optional": true 151 }, 152 "icons_attention": { 153 "$ref": "ThemeColor", 154 "optional": true 155 }, 156 "button_background_hover": { 157 "$ref": "ThemeColor", 158 "optional": true 159 }, 160 "button_background_active": { 161 "$ref": "ThemeColor", 162 "optional": true 163 }, 164 "popup": { 165 "$ref": "ThemeColor", 166 "optional": true 167 }, 168 "popup_text": { 169 "$ref": "ThemeColor", 170 "optional": true 171 }, 172 "popup_border": { 173 "$ref": "ThemeColor", 174 "optional": true 175 } 176 }, 177 "additionalProperties": { "$ref": "UnrecognizedProperty" } 178 }, 179 "icons": { 180 "type": "object", 181 "optional": true, 182 "properties": { 183 "back": { 184 "$ref": "ExtensionURL", 185 "optional": true 186 }, 187 "forward": { 188 "$ref": "ExtensionURL", 189 "optional": true 190 }, 191 "reload": { 192 "$ref": "ExtensionURL", 193 "optional": true 194 }, 195 "stop": { 196 "$ref": "ExtensionURL", 197 "optional": true 198 }, 199 "bookmark_star": { 200 "$ref": "ExtensionURL", 201 "optional": true 202 }, 203 "bookmark_menu": { 204 "$ref": "ExtensionURL", 205 "optional": true 206 }, 207 "downloads": { 208 "$ref": "ExtensionURL", 209 "optional": true 210 }, 211 "home": { 212 "$ref": "ExtensionURL", 213 "optional": true 214 }, 215 "app_menu": { 216 "$ref": "ExtensionURL", 217 "optional": true 218 }, 219 "cut": { 220 "$ref": "ExtensionURL", 221 "optional": true 222 }, 223 "copy": { 224 "$ref": "ExtensionURL", 225 "optional": true 226 }, 227 "paste": { 228 "$ref": "ExtensionURL", 229 "optional": true 230 }, 231 "new_window": { 232 "$ref": "ExtensionURL", 233 "optional": true 234 }, 235 "new_private_window": { 236 "$ref": "ExtensionURL", 237 "optional": true 238 }, 239 "save_page": { 240 "$ref": "ExtensionURL", 241 "optional": true 242 }, 243 "print": { 244 "$ref": "ExtensionURL", 245 "optional": true 246 }, 247 "history": { 248 "$ref": "ExtensionURL", 249 "optional": true 250 }, 251 "full_screen": { 252 "$ref": "ExtensionURL", 253 "optional": true 254 }, 255 "find": { 256 "$ref": "ExtensionURL", 257 "optional": true 258 }, 259 "options": { 260 "$ref": "ExtensionURL", 261 "optional": true 262 }, 263 "addons": { 264 "$ref": "ExtensionURL", 265 "optional": true 266 }, 267 "developer": { 268 "$ref": "ExtensionURL", 269 "optional": true 270 }, 271 "synced_tabs": { 272 "$ref": "ExtensionURL", 273 "optional": true 274 }, 275 "open_file": { 276 "$ref": "ExtensionURL", 277 "optional": true 278 }, 279 "sidebars": { 280 "$ref": "ExtensionURL", 281 "optional": true 282 }, 283 "subscribe": { 284 "$ref": "ExtensionURL", 285 "optional": true 286 }, 287 "text_encoding": { 288 "$ref": "ExtensionURL", 289 "optional": true 290 }, 291 "email_link": { 292 "$ref": "ExtensionURL", 293 "optional": true 294 }, 295 "forget": { 296 "$ref": "ExtensionURL", 297 "optional": true 298 }, 299 "pocket": { 300 "$ref": "ExtensionURL", 301 "optional": true 302 }, 303 "getmsg": { 304 "$ref": "ExtensionURL", 305 "optional": true 306 }, 307 "newmsg": { 308 "$ref": "ExtensionURL", 309 "optional": true 310 }, 311 "address": { 312 "$ref": "ExtensionURL", 313 "optional": true 314 }, 315 "reply": { 316 "$ref": "ExtensionURL", 317 "optional": true 318 }, 319 "replyall": { 320 "$ref": "ExtensionURL", 321 "optional": true 322 }, 323 "replylist": { 324 "$ref": "ExtensionURL", 325 "optional": true 326 }, 327 "forwarding": { 328 "$ref": "ExtensionURL", 329 "optional": true 330 }, 331 "delete": { 332 "$ref": "ExtensionURL", 333 "optional": true 334 }, 335 "junk": { 336 "$ref": "ExtensionURL", 337 "optional": true 338 }, 339 "file": { 340 "$ref": "ExtensionURL", 341 "optional": true 342 }, 343 "nextUnread": { 344 "$ref": "ExtensionURL", 345 "optional": true 346 }, 347 "prevUnread": { 348 "$ref": "ExtensionURL", 349 "optional": true 350 }, 351 "mark": { 352 "$ref": "ExtensionURL", 353 "optional": true 354 }, 355 "tag": { 356 "$ref": "ExtensionURL", 357 "optional": true 358 }, 359 "compact": { 360 "$ref": "ExtensionURL", 361 "optional": true 362 }, 363 "archive": { 364 "$ref": "ExtensionURL", 365 "optional": true 366 }, 367 "chat": { 368 "$ref": "ExtensionURL", 369 "optional": true 370 }, 371 "nextMsg": { 372 "$ref": "ExtensionURL", 373 "optional": true 374 }, 375 "prevMsg": { 376 "$ref": "ExtensionURL", 377 "optional": true 378 }, 379 "QFB": { 380 "$ref": "ExtensionURL", 381 "optional": true 382 }, 383 "conversation": { 384 "$ref": "ExtensionURL", 385 "optional": true 386 }, 387 "newcard": { 388 "$ref": "ExtensionURL", 389 "optional": true 390 }, 391 "newlist": { 392 "$ref": "ExtensionURL", 393 "optional": true 394 }, 395 "editcard": { 396 "$ref": "ExtensionURL", 397 "optional": true 398 }, 399 "newim": { 400 "$ref": "ExtensionURL", 401 "optional": true 402 }, 403 "send": { 404 "$ref": "ExtensionURL", 405 "optional": true 406 }, 407 "spelling": { 408 "$ref": "ExtensionURL", 409 "optional": true 410 }, 411 "attach": { 412 "$ref": "ExtensionURL", 413 "optional": true 414 }, 415 "security": { 416 "$ref": "ExtensionURL", 417 "optional": true 418 }, 419 "save": { 420 "$ref": "ExtensionURL", 421 "optional": true 422 }, 423 "quote": { 424 "$ref": "ExtensionURL", 425 "optional": true 426 }, 427 "buddy": { 428 "$ref": "ExtensionURL", 429 "optional": true 430 }, 431 "join_chat": { 432 "$ref": "ExtensionURL", 433 "optional": true 434 }, 435 "chat_accounts": { 436 "$ref": "ExtensionURL", 437 "optional": true 438 }, 439 "calendar": { 440 "$ref": "ExtensionURL", 441 "optional": true 442 }, 443 "tasks": { 444 "$ref": "ExtensionURL", 445 "optional": true 446 }, 447 "synchronize": { 448 "$ref": "ExtensionURL", 449 "optional": true 450 }, 451 "newevent": { 452 "$ref": "ExtensionURL", 453 "optional": true 454 }, 455 "newtask": { 456 "$ref": "ExtensionURL", 457 "optional": true 458 }, 459 "editevent": { 460 "$ref": "ExtensionURL", 461 "optional": true 462 }, 463 "today": { 464 "$ref": "ExtensionURL", 465 "optional": true 466 }, 467 "category": { 468 "$ref": "ExtensionURL", 469 "optional": true 470 }, 471 "complete": { 472 "$ref": "ExtensionURL", 473 "optional": true 474 }, 475 "priority": { 476 "$ref": "ExtensionURL", 477 "optional": true 478 }, 479 "saveandclose": { 480 "$ref": "ExtensionURL", 481 "optional": true 482 }, 483 "attendees": { 484 "$ref": "ExtensionURL", 485 "optional": true 486 }, 487 "privacy": { 488 "$ref": "ExtensionURL", 489 "optional": true 490 }, 491 "status": { 492 "$ref": "ExtensionURL", 493 "optional": true 494 }, 495 "freebusy": { 496 "$ref": "ExtensionURL", 497 "optional": true 498 }, 499 "timezones": { 500 "$ref": "ExtensionURL", 501 "optional": true 502 } 503 }, 504 "additionalProperties": { "$ref": "UnrecognizedProperty" } 505 }, 506 "properties": { 507 "type": "object", 508 "optional": true, 509 "properties": { 510 "additional_backgrounds_alignment": { 511 "type": "array", 512 "items": { 513 "type": "string", 514 "enum": [ 515 "bottom", "center", "left", "right", "top", 516 "center bottom", "center center", "center top", 517 "left bottom", "left center", "left top", 518 "right bottom", "right center", "right top" 519 ] 520 }, 521 "optional": true 522 }, 523 "additional_backgrounds_tiling": { 524 "type": "array", 525 "items": { 526 "type": "string", 527 "enum": ["no-repeat", "repeat", "repeat-x", "repeat-y"] 528 }, 529 "optional": true 530 } 531 }, 532 "additionalProperties": { "$ref": "UnrecognizedProperty" } 533 } 534 }, 535 "additionalProperties": { "$ref": "UnrecognizedProperty" } 536 }, 537 { 538 "id": "ThemeManifest", 539 "type": "object", 540 "description": "Contents of manifest.json for a static theme", 541 "$import": "manifest.ManifestBase", 542 "properties": { 543 "theme": { 544 "$ref": "ThemeType" 545 }, 546 "icons": { 547 "type": "object", 548 "optional": true, 549 "patternProperties": { 550 "^[1-9]\\d*$": { "type": "string" } 551 } 552 } 553 } 554 } 555 ] 556 }, 557 { 558 "namespace": "theme", 559 "description": "The theme API allows customizing of visual elements of the browser.", 560 "permissions": ["theme"], 561 "types": [ 562 { 563 "id": "ThemeUpdateInfo", 564 "type": "object", 565 "description": "Info provided in the onUpdated listener.", 566 "properties": { 567 "theme": { 568 "type": "object", 569 "description": "The new theme after update" 570 }, 571 "windowId": { 572 "type": "integer", 573 "description": "The id of the window the theme has been applied to", 574 "optional": true 575 } 576 } 577 } 578 ], 579 "events": [ 580 { 581 "name": "onUpdated", 582 "type": "function", 583 "description": "Fired when a new theme has been applied", 584 "parameters": [ 585 { 586 "$ref": "ThemeUpdateInfo", 587 "name": "updateInfo", 588 "description": "Details of the theme update" 589 } 590 ] 591 } 592 ], 593 "functions": [ 594 { 595 "name": "getCurrent", 596 "type": "function", 597 "async": true, 598 "description": "Returns the current theme for the specified window or the last focused window.", 599 "parameters": [ 600 { 601 "type": "integer", 602 "name": "windowId", 603 "optional": true, 604 "description": "The window for which we want the theme." 605 } 606 ] 607 }, 608 { 609 "name": "update", 610 "type": "function", 611 "async": true, 612 "description": "Make complete updates to the theme. Resolves when the update has completed.", 613 "parameters": [ 614 { 615 "type": "integer", 616 "name": "windowId", 617 "optional": true, 618 "description": "The id of the window to update. No id updates all windows." 619 }, 620 { 621 "name": "details", 622 "$ref": "manifest.ThemeType", 623 "description": "The properties of the theme to update." 624 } 625 ] 626 }, 627 { 628 "name": "reset", 629 "type": "function", 630 "async": true, 631 "description": "Removes the updates made to the theme.", 632 "parameters": [ 633 { 634 "type": "integer", 635 "name": "windowId", 636 "optional": true, 637 "description": "The id of the window to reset. No id resets all windows." 638 } 639 ] 640 } 641 ] 642 } 643] 644