| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 [ | 5 [ |
| 6 { | 6 { |
| 7 "namespace": "inputMethodPrivate", | 7 "namespace": "inputMethodPrivate", |
| 8 "platforms": ["chromeos"], | 8 "platforms": ["chromeos"], |
| 9 "description": "none", | 9 "description": "none", |
| 10 "functions": [ | 10 "functions": [ |
| 11 { | 11 { |
| 12 "name": "get", | 12 "name": "getInputMethods", |
| 13 "type": "function", |
| 14 "description": "Gets all whitelisted input methods.", |
| 15 "parameters": [ |
| 16 { |
| 17 "name": "callback", |
| 18 "type": "function", |
| 19 "optional": false, |
| 20 "description": "Callback which is called with the input method objec
ts.", |
| 21 "parameters": [ |
| 22 { |
| 23 "name": "inputMethods", |
| 24 "type": "array", |
| 25 "description": "Whitelisted input method objects.", |
| 26 "items": { |
| 27 "type": "object", |
| 28 "properties": { |
| 29 "id": {"type": "string"}, |
| 30 "name": {"type": "string"}, |
| 31 "indicator": {"type": "string"} |
| 32 } |
| 33 } |
| 34 } |
| 35 ] |
| 36 } |
| 37 ] |
| 38 }, { |
| 39 "name": "getCurrentInputMethod", |
| 13 "type": "function", | 40 "type": "function", |
| 14 "description": "Gets the current input method.", | 41 "description": "Gets the current input method.", |
| 15 "parameters": [ | 42 "parameters": [ |
| 16 { | 43 { |
| 17 "name": "callback", | 44 "name": "callback", |
| 18 "type": "function", | 45 "type": "function", |
| 19 "optional": false, | 46 "optional": false, |
| 20 "description": "Callback which is called with the current input meth
od.", | 47 "description": "Callback which is called with the current input meth
od.", |
| 21 "parameters": [ | 48 "parameters": [ |
| 22 { | 49 { |
| 23 "name": "inputMethodId", | 50 "name": "inputMethodId", |
| 24 "type": "string", | 51 "type": "string", |
| 25 "description": "Current input method." | 52 "description": "Current input method." |
| 26 } | 53 } |
| 27 ] | 54 ] |
| 28 } | 55 } |
| 29 ] | 56 ] |
| 30 }, { | 57 }, { |
| 58 "name": "setCurrentInputMethod", |
| 59 "type": "function", |
| 60 "description": "Sets the current input method.", |
| 61 "parameters": [ |
| 62 { |
| 63 "name": "inputMethodId", |
| 64 "type": "string", |
| 65 "optional": false, |
| 66 "description": "The input method ID to be set as current input metho
d." |
| 67 }, |
| 68 { |
| 69 "name": "callback", |
| 70 "type": "function", |
| 71 "optional": true, |
| 72 "description": "Callback which is called once the current input meth
od is set or error occurs.", |
| 73 "parameters": [] |
| 74 } |
| 75 ] |
| 76 }, { |
| 31 "name": "startIme", | 77 "name": "startIme", |
| 32 "type": "function", | 78 "type": "function", |
| 33 "description": "Notify to input method engine to be ready to accept even
ts.", | 79 "description": "Notify to input method engine to be ready to accept even
ts.", |
| 34 "parameters" : [] | 80 "parameters" : [] |
| 35 } | 81 } |
| 36 ], | 82 ], |
| 37 "events": [ | 83 "events": [ |
| 38 { | 84 { |
| 39 "name": "onChanged", | 85 "name": "onChanged", |
| 40 "type": "function", | 86 "type": "function", |
| 41 "description": "Fired when the input method is changed.", | 87 "description": "Fired when the input method is changed.", |
| 42 "parameters": [ | 88 "parameters": [ |
| 43 { | 89 { |
| 44 "name": "newInputMethodId", | 90 "name": "newInputMethodId", |
| 45 "type": "string", | 91 "type": "string", |
| 46 "description": "New input method which is being used." | 92 "description": "New input method which is being used." |
| 47 } | 93 } |
| 48 ] | 94 ] |
| 49 } | 95 } |
| 50 ] | 96 ] |
| 51 } | 97 } |
| 52 ] | 98 ] |
| OLD | NEW |