| // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| [ |
| { |
| "namespace": "inputMethodPrivate", |
| "platforms": ["chromeos"], |
| "description": "none", |
| "functions": [ |
| { |
| "name": "getInputMethods", |
| "type": "function", |
| "description": "Gets all whitelisted input methods.", |
| "parameters": [ |
| { |
| "name": "callback", |
| "type": "function", |
| "optional": false, |
| "description": "Callback which is called with the input method objects.", |
| "parameters": [ |
| { |
| "name": "inputMethods", |
| "type": "array", |
| "description": "Whitelisted input method objects.", |
| "items": { |
| "type": "object", |
| "properties": { |
| "id": {"type": "string"}, |
| "name": {"type": "string"}, |
| "indicator": {"type": "string"} |
| } |
| } |
| } |
| ] |
| } |
| ] |
| }, { |
| "name": "getCurrentInputMethod", |
| "type": "function", |
| "description": "Gets the current input method.", |
| "parameters": [ |
| { |
| "name": "callback", |
| "type": "function", |
| "optional": false, |
| "description": "Callback which is called with the current input method.", |
| "parameters": [ |
| { |
| "name": "inputMethodId", |
| "type": "string", |
| "description": "Current input method." |
| } |
| ] |
| } |
| ] |
| }, { |
| "name": "setCurrentInputMethod", |
| "type": "function", |
| "description": "Sets the current input method.", |
| "parameters": [ |
| { |
| "name": "inputMethodId", |
| "type": "string", |
| "optional": false, |
| "description": "The input method ID to be set as current input method." |
| }, |
| { |
| "name": "callback", |
| "type": "function", |
| "optional": true, |
| "description": "Callback which is called once the current input method is set or error occurs.", |
| "parameters": [] |
| } |
| ] |
| } |
| ], |
| "events": [ |
| { |
| "name": "onChanged", |
| "type": "function", |
| "description": "Fired when the input method is changed.", |
| "parameters": [ |
| { |
| "name": "newInputMethodId", |
| "type": "string", |
| "description": "New input method which is being used." |
| } |
| ] |
| } |
| ] |
| } |
| ] |