Kkinaba@chromium.orgPepper IME API for surrounding text retrieval.
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Pepper IME API for surrounding text retrieval. IME benefits from knowing what portion of text is selected inside a text editing plugin. This change is to implement a Pepper API for doing it. It consists of three API functions: 1. Browser asks plugins by PPP_TextInput_Dev::RequestSurroundingText() to send such info. 2. Plugin must reply the query by PPB_TextInput_Dev::UpdateSurroundingText(). 3. Additionally, plugin notifies the browser by PPB_TextInput_Dev::SelectionChanged() that the selection is changed. Typically triggers the steps 1->2. Intention of the API design is (1) to avoid synchronous IPC, and (2) to keep the room to implement it in an optimal and right way, that is, expensive send of selection text happens only when needed (= "IME requiring the info is on" + "selection indeed changed in the plugin"), though the current impl in the patch is not necessary like that (for sake of simplicity). The changes in the API is in: * ppapi/c/dev/ppb_text_input_dev.h * ppapi/c/dev/ppp_text_input_dev.h The browser side implementation mostly resides in: * content/renderer/render_view_impl.cc * content/renderer/pepper/pepper_plugin_delegate_impl.{h,cc} * webkit/plugins/ppapi/ppapi_plugin_instance.{h,cc} The other files are for wiring necessary cables. BUG=101101 TEST=Manual: make ppapi_example_ime and run ./your/chrome --register-pepper-plugins=\ "/path/to/ppapi_example_ime.plugin;application/x-ppapi-example-ime" \ --ppapi-out-of-process \ file:///path/to/ppapi/examples/ime/ime.html Try some IME that supports reconversion (e.g., Google Japanese Input on Windows). Review URL: http://codereview.chromium.org/8769003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126862 0039d316-1c4b-4281-b951-d872f2087c98 | 14 年前 | |
(Cleanup) Use its own MIME type in the PPAPI IME example. As other examples do, use own MIME type instead of application/x-ppapi-example. BUG=none TEST=make ppapi_example_ime, and verify the following command loads the example. chrome \ --register-ppapi-plugins="/path/to/libppapi_example_ime.so;application/x-ppapi-example-ime" \ file:///path/to/ppapi/examples/ime.html Review URL: http://codereview.chromium.org/8728023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114371 0039d316-1c4b-4281-b951-d872f2087c98 | 14 年前 |