Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Issue 8769003: Pepper IME API for surrounding text retrieval. (Closed)

Created:
9 years ago by kinaba
Modified:
8 years, 9 months ago
Reviewers:
James Su, brettw, yzshen1, kochi
CC:
chromium-reviews, jam, yzshen+watch_chromium.org, dpranke-watch+content_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, ihf+watch_chromium.org
Visibility:
Public.

Description

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). Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=126862

Patch Set 1 : Merge trunk and fix misc check failures. #

Patch Set 2 : Merge master. #

Total comments: 2

Patch Set 3 : Sort. #

Total comments: 31

Patch Set 4 : Reflected comments from yzshen and suzhe + merge master. #

Patch Set 5 : Merge master. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+669 lines, -60 lines) Patch
M content/renderer/pepper/pepper_plugin_delegate_impl.h View 1 2 3 3 chunks +7 lines, -0 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_delegate_impl.cc View 1 2 3 2 chunks +13 lines, -0 lines 0 comments Download
M content/renderer/render_view_impl.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 2 chunks +37 lines, -25 lines 0 comments Download
M ppapi/api/dev/ppb_text_input_dev.idl View 1 2 3 2 chunks +41 lines, -1 line 0 comments Download
A ppapi/api/dev/ppp_text_input_dev.idl View 1 2 3 1 chunk +27 lines, -0 lines 0 comments Download
M ppapi/c/dev/ppb_text_input_dev.h View 1 2 3 4 chunks +48 lines, -4 lines 0 comments Download
A ppapi/c/dev/ppp_text_input_dev.h View 1 2 3 1 chunk +49 lines, -0 lines 0 comments Download
M ppapi/cpp/dev/text_input_dev.h View 1 2 3 1 chunk +33 lines, -4 lines 0 comments Download
M ppapi/cpp/dev/text_input_dev.cc View 1 2 3 2 chunks +72 lines, -15 lines 0 comments Download
M ppapi/examples/ime/ime.cc View 1 2 3 4 chunks +25 lines, -8 lines 0 comments Download
M ppapi/ppapi_proxy.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M ppapi/ppapi_sources.gypi View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M ppapi/proxy/interface_list.cc View 1 2 chunks +4 lines, -0 lines 0 comments Download
M ppapi/proxy/ppapi_messages.h View 1 2 3 2 chunks +12 lines, -0 lines 0 comments Download
M ppapi/proxy/ppb_text_input_proxy.h View 1 2 3 3 chunks +12 lines, -0 lines 0 comments Download
M ppapi/proxy/ppb_text_input_proxy.cc View 3 chunks +35 lines, -0 lines 0 comments Download
A ppapi/proxy/ppp_text_input_proxy.h View 1 2 3 1 chunk +41 lines, -0 lines 0 comments Download
A ppapi/proxy/ppp_text_input_proxy.cc View 1 chunk +73 lines, -0 lines 0 comments Download
M ppapi/shared_impl/api_id.h View 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/thunk/interfaces_ppb_public_dev.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M ppapi/thunk/ppb_text_input_api.h View 1 chunk +5 lines, -0 lines 0 comments Download
M ppapi/thunk/ppb_text_input_thunk.cc View 1 chunk +27 lines, -2 lines 0 comments Download
M webkit/plugins/ppapi/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M webkit/plugins/ppapi/mock_plugin_delegate.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M webkit/plugins/ppapi/mock_plugin_delegate.cc View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/plugin_delegate.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/ppapi_plugin_instance.h View 1 2 3 4 7 chunks +17 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/ppapi_plugin_instance.cc View 1 2 3 4 8 chunks +56 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/ppb_text_input_impl.h View 1 chunk +5 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/ppb_text_input_impl.cc View 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
kinaba
Hello folks. This patch is the continuation of Pepper IME API work (e.g., http://codereview.chromium.org/8073021/). Could ...
8 years, 9 months ago (2012-03-01 13:25:48 UTC) #1
kinaba
On 2012/03/01 13:25:48, kinaba wrote: > Hello folks. This patch is the continuation of Pepper ...
8 years, 9 months ago (2012-03-07 05:42:12 UTC) #2
kochi
new interfaces definition LGTM. http://codereview.chromium.org/8769003/diff/37001/ppapi/ppapi_sources.gypi File ppapi/ppapi_sources.gypi (right): http://codereview.chromium.org/8769003/diff/37001/ppapi/ppapi_sources.gypi#newcode73 ppapi/ppapi_sources.gypi:73: 'c/dev/ppb_text_input_dev.h', nit: swap line 73 ...
8 years, 9 months ago (2012-03-07 08:43:02 UTC) #3
kinaba
http://codereview.chromium.org/8769003/diff/37001/ppapi/ppapi_sources.gypi File ppapi/ppapi_sources.gypi (right): http://codereview.chromium.org/8769003/diff/37001/ppapi/ppapi_sources.gypi#newcode73 ppapi/ppapi_sources.gypi:73: 'c/dev/ppb_text_input_dev.h', On 2012/03/07 08:43:02, Takayoshi Kochi wrote: > nit: ...
8 years, 9 months ago (2012-03-07 09:24:03 UTC) #4
yzshen1
Only a few nits for the interface definition. Will review and comment on the other ...
8 years, 9 months ago (2012-03-07 18:22:55 UTC) #5
yzshen1
http://codereview.chromium.org/8769003/diff/36043/content/renderer/render_view_impl.h File content/renderer/render_view_impl.h (right): http://codereview.chromium.org/8769003/diff/36043/content/renderer/render_view_impl.h#newcode273 content/renderer/render_view_impl.h:273: // Informs the render view that a PPAPI plugin ...
8 years, 9 months ago (2012-03-08 07:51:43 UTC) #6
James Su
Sorry for late reply. Overall the CL looks good to me. Just one question needs ...
8 years, 9 months ago (2012-03-08 17:27:21 UTC) #7
kinaba
On 2012/03/08 17:27:21, James Su wrote: > Sorry for late reply. Overall the CL looks ...
8 years, 9 months ago (2012-03-13 15:29:27 UTC) #8
kinaba
Updated. http://codereview.chromium.org/8769003/diff/36043/content/renderer/render_view_impl.h File content/renderer/render_view_impl.h (right): http://codereview.chromium.org/8769003/diff/36043/content/renderer/render_view_impl.h#newcode273 content/renderer/render_view_impl.h:273: // Informs the render view that a PPAPI ...
8 years, 9 months ago (2012-03-14 04:28:53 UTC) #9
James Su
LGTM, as long as you are aware of this issue. On 2012/03/13 15:29:27, kinaba wrote: ...
8 years, 9 months ago (2012-03-14 04:44:42 UTC) #10
yzshen1
LGTM Thanks! http://codereview.chromium.org/8769003/diff/36043/ppapi/cpp/dev/text_input_dev.cc File ppapi/cpp/dev/text_input_dev.cc (right): http://codereview.chromium.org/8769003/diff/36043/ppapi/cpp/dev/text_input_dev.cc#newcode20 ppapi/cpp/dev/text_input_dev.cc:20: uint32_t desired_number_of_chanracetes) { I am pretty sure ...
8 years, 9 months ago (2012-03-14 06:48:08 UTC) #11
kinaba
Brett, could you take a look? On 2012/03/14 06:48:08, yzshen1 wrote: > LGTM > > ...
8 years, 9 months ago (2012-03-14 18:10:44 UTC) #12
brettw
lgtm
8 years, 9 months ago (2012-03-14 19:07:24 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinaba@chromium.org/8769003/59025
8 years, 9 months ago (2012-03-14 19:16:10 UTC) #14
commit-bot: I haz the power
Try job failure for 8769003-59025 (retry) on win_rel for step "browser_tests". It's a second try, ...
8 years, 9 months ago (2012-03-14 22:16:52 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinaba@chromium.org/8769003/59025
8 years, 9 months ago (2012-03-14 22:27:51 UTC) #16
commit-bot: I haz the power
Try job failure for 8769003-59025 (retry) (retry) on linux_rel for step "browser_tests". It's a second ...
8 years, 9 months ago (2012-03-15 00:37:27 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinaba@chromium.org/8769003/59025
8 years, 9 months ago (2012-03-15 02:11:46 UTC) #18
commit-bot: I haz the power
Try job failure for 8769003-59025 (retry) on win for step "compile" (clobber build). It's a ...
8 years, 9 months ago (2012-03-15 04:19:15 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinaba@chromium.org/8769003/59025
8 years, 9 months ago (2012-03-15 06:08:49 UTC) #20
commit-bot: I haz the power
8 years, 9 months ago (2012-03-15 07:34:54 UTC) #21
Change committed as 126862

Powered by Google App Engine
This is Rietveld 408576698