Chromium Code Reviews| Index: ppapi/api/dev/ppb_text_input_dev.idl |
| diff --git a/ppapi/api/dev/ppb_text_input_dev.idl b/ppapi/api/dev/ppb_text_input_dev.idl |
| index fde2574a616b5b3fe1c8fd8e9b1f4805e4a57b3f..05bc0151798eebf6b7fb90de6a7ea24e44f7e905 100644 |
| --- a/ppapi/api/dev/ppb_text_input_dev.idl |
| +++ b/ppapi/api/dev/ppb_text_input_dev.idl |
| @@ -8,7 +8,8 @@ |
| */ |
| label Chrome { |
| - M16 = 0.1 |
| + M16 = 0.1, |
| + M19 = 0.2 |
| }; |
| /** |
| @@ -66,4 +67,42 @@ interface PPB_TextInput_Dev { |
| * Cancels the current composition in IME. |
| */ |
| void CancelCompositionText([in] PP_Instance instance); |
| + |
| + /** |
| + * In response to the <code>PPP_TextInput_Dev::RequestSurroundingText</code> |
| + * call, informs the browser about the current text selection and surrounding |
| + * text. <code>text</code> is an UTF-8 string that contains the current range |
|
yzshen1
2012/03/07 18:22:56
nit: an -> a
kinaba
2012/03/14 04:28:53
Done.
|
| + * of text selection in the plugin. <code>caret</code> is the byte-index of |
| + * the caret poisition within <code>text</code>. <code>anchor</code> is the |
| + * byte-index of the anchor position (i.e., if a range of text is selected, |
| + * it is the other edge of selection diffrent from <code>caret</code>. If |
| + * there are no selection, <code>anchor</code> is equal to <code>caret</code>. |
| + * |
| + * Typical use of this information in the browser is to enable "reconversion" |
| + * features of IME that puts back the already commited text into the |
|
yzshen1
2012/03/07 18:22:56
nit: committed.
kinaba
2012/03/14 04:28:53
Done.
|
| + * pre-commit composition state. Another use is to improve the precision |
| + * of suggestion of IME by taking the context into account (e.g., if the caret |
| + * looks to be on the beggining of a sentense, suggest capital letters in a |
|
yzshen1
2012/03/07 18:22:56
beggining -> begining
kinaba
2012/03/14 04:28:53
Done.
|
| + * virtual keyboard). |
| + * |
| + * When the focus is not on text, or when the plugin do not want to send the |
|
yzshen1
2012/03/07 18:22:56
do -> does
kinaba
2012/03/14 04:28:53
Done.
|
| + * selection to the browser (e.g., concerning security), call this function |
| + * setting <code>text</code> to an empty string and <code>caret</code> and |
| + * <code>anchor</code> to zero. |
| + */ |
| + [version=0.2] |
| + void UpdateSurroundingText([in] PP_Instance instance, |
| + [in] str_t text, |
| + [in] uint32_t caret, |
| + [in] uint32_t anchor); |
| + |
| + /** |
| + * Informs the browser when a range of text selection is changed in a plugin. |
| + * When the browser needs to know the content of the updated selection, it |
| + * pings back by <code>PPP_TextInput_Dev::RequestSurroundingText</code>. The |
| + * plugin then should send the information with |
| + * <code>UpdateSurroundingText</code>. |
| + */ |
| + [version=0.2] |
| + void SelectionChanged([in] PP_Instance instance); |
| }; |