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": "inputMethodPrivate", 8 "platforms": ["chromeos"], 9 "description": "none", 10 "functions": [ 11 { 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 objects.", 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", 40 "type": "function", 41 "description": "Gets the current input method.", 42 "parameters": [ 43 { 44 "name": "callback", 45 "type": "function", 46 "optional": false, 47 "description": "Callback which is called with the current input method.", 48 "parameters": [ 49 { 50 "name": "inputMethodId", 51 "type": "string", 52 "description": "Current input method." 53 } 54 ] 55 } 56 ] 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 method." 67 }, 68 { 69 "name": "callback", 70 "type": "function", 71 "optional": true, 72 "description": "Callback which is called once the current input method is set or error occurs.", 73 "parameters": [] 74 } 75 ] 76 } 77 ], 78 "events": [ 79 { 80 "name": "onChanged", 81 "type": "function", 82 "description": "Fired when the input method is changed.", 83 "parameters": [ 84 { 85 "name": "newInputMethodId", 86 "type": "string", 87 "description": "New input method which is being used." 88 } 89 ] 90 } 91 ] 92 } 93 ] 94