| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 [ |
| 6 { |
| 7 "namespace": "commands", |
| 8 "types": [ |
| 9 { |
| 10 "id": "Command", |
| 11 "type": "object", |
| 12 "properties": { |
| 13 "name": { |
| 14 "type": "string", |
| 15 "optional": true, |
| 16 "description": "The name of the Extension Command" |
| 17 }, |
| 18 "description": { |
| 19 "type": "string", |
| 20 "optional": true, |
| 21 "description": "The Extension Command description" |
| 22 }, |
| 23 "shortcut": { |
| 24 "type": "string", |
| 25 "optional": true, |
| 26 "description": "The shortcut active for this command, or blank if no
t active." |
| 27 } |
| 28 } |
| 29 } |
| 30 ], |
| 31 "events": [ |
| 32 { |
| 33 "name": "onCommand", |
| 34 "description": "Fired when a registered command is activated using a key
board shortcut.", |
| 35 "type": "function", |
| 36 "parameters": [ |
| 37 { |
| 38 "name": "command", |
| 39 "type": "string" |
| 40 } |
| 41 ] |
| 42 } |
| 43 ], |
| 44 "functions": [ |
| 45 { |
| 46 "name": "getAll", |
| 47 "type": "function", |
| 48 "description": "Returns all the registered extension commands for this e
xtension and their shortcut (if active).", |
| 49 "parameters": [ |
| 50 { |
| 51 "type": "function", |
| 52 "name": "callback", |
| 53 "optional": true, |
| 54 "parameters": [ |
| 55 { |
| 56 "name": "commands", |
| 57 "type": "array", |
| 58 "items": { |
| 59 "$ref": "Command" |
| 60 } |
| 61 } |
| 62 ], |
| 63 "description": "Called to return the registered commands." |
| 64 } |
| 65 ] |
| 66 } |
| 67 ] |
| 68 } |
| 69 ] |
| OLD | NEW |