| OLD | NEW |
| (Empty) | |
| 1 /* Copyright (c) 2011 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 * Implementation of the TextInput interface. |
| 8 */ |
| 9 |
| 10 label Chrome { |
| 11 M16 = 0.1 |
| 12 }; |
| 13 |
| 14 /** |
| 15 * PP_TextInput_Type is used to indicate the status of a plugin in regard to |
| 16 * text input. Intentionally kept sync with WebKit::WebTextInputType defined in: |
| 17 * third_party/WebKit/Source/WebKit/chromium/public/WebTextInputType.h |
| 18 */ |
| 19 [assert_size(4)] |
| 20 enum PP_TextInput_Type { |
| 21 /** |
| 22 * Input caret is not in an editable node, no input method shall be used. |
| 23 */ |
| 24 PP_TEXTINPUT_TYPE_NONE = 0, |
| 25 /** |
| 26 * Input caret is in a normal editable node, any input method can be used. |
| 27 */ |
| 28 PP_TEXTINPUT_TYPE_TEXT = 1, |
| 29 /** |
| 30 * Input caret is in a password box, an input method may be used only if |
| 31 * it's suitable for password input. |
| 32 */ |
| 33 PP_TEXTINPUT_TYPE_PASSWORD = 2, |
| 34 PP_TEXTINPUT_TYPE_SEARCH = 3, |
| 35 PP_TEXTINPUT_TYPE_EMAIL = 4, |
| 36 PP_TEXTINPUT_TYPE_NUMBER = 5, |
| 37 PP_TEXTINPUT_TYPE_TELEPHONE = 6, |
| 38 PP_TEXTINPUT_TYPE_URL = 7 |
| 39 }; |
| 40 |
| 41 interface PPB_TextInput_Dev { |
| 42 /** |
| 43 * Informs the browser about the current text input mode of the plugin. |
| 44 */ |
| 45 void SetTextInputType([in] PP_Instance instance, |
| 46 [in] PP_TextInput_Type type); |
| 47 |
| 48 /** |
| 49 * Informs the browser about the coordinates of the text input caret, and the |
| 50 * bounding box of the text input area. The browser uses the information to |
| 51 * locate the composition candidate window, etc. |
| 52 */ |
| 53 void UpdateCaretPosition([in] PP_Instance instance, |
| 54 [in] PP_Rect caret, |
| 55 [in] PP_Rect boundingBox); |
| 56 /** |
| 57 * Force to commit the current composition text (if any). |
| 58 */ |
| 59 void ConfirmCompositionText([in] PP_Instance instance); |
| 60 |
| 61 /** |
| 62 * Cancel the current composition (if any). |
| 63 */ |
| 64 void CancelCompositionText([in] PP_Instance instance); |
| 65 }; |
| OLD | NEW |