New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 837710 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Blocked on:
issue 681563

Blocking:
issue 837684
issue 841020



Sign in to add a comment

Wire up IME for WindowService as a library

Project Member Reported by sky@chromium.org, Apr 27 2018

Issue description

There are a couple of IME related functions in WindowServiceClient for this: SetWindowTextInputState and SetImeVisibility. But these were designed to go hand in hand with IME interfaces in services/ui/public/interfaces/ime. suzhe@ has expressed in an interest in redoing these interfaces, so we should likely hold off on updating these until suzhe's work is done.
 

Comment 1 by suzhe@chromium.org, Apr 28 2018

Cc: shuchen@chromium.org

Comment 2 by sky@chromium.org, May 8 2018

Blocking: 841020
Owner: shuchen@chromium.org
Status: Assigned (was: Untriaged)
shuchen@ could you please triage?

Comment 4 by sky@chromium.org, May 14 2018

Owner: xiy...@chromium.org
shuchen will eventually take this over, but his timeline is farther out. In the mean time this bug is about implementing the existing IME related interfaces in services/ui/public/interfaces/ime.mojom on-top of ws2. It may be as simple as copying the code from services/ui/ime into services/ui/ws2 and wiring up for OopAsh.

An old design doc is here: https://docs.google.com/document/d/1LNxH7fRpQcuNzKxzMs4kKl4xnO-2Wa_ocZkNsr9vfdo/edit#heading=h.92cxd2mu4hww .

FYI. I am currently designing the new mojo based IMF. The implementation would start from refactoring the interfaces in ime.mojom. Stay tuned.

Comment 6 by sky@chromium.org, May 16 2018

We will soon have some production apps using the existing code, so be sure and create new mojoms until it can replace existing ones.

Comment 7 by xiy...@chromium.org, May 16 2018

shuchen@, do you have a draft ddoc? Or the doc sky@ pointed out is still good?
The doc sky@ pointed out is still good to describe the existing code.

I've drafted a doc for the future IMF. Please refer to: https://drive.google.com/open?id=1r2h56BwLE6CywnroRnXtFMxRgNoMMpohPpczPqFck_o
Project Member

Comment 9 by bugdroid1@chromium.org, May 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a4e2893b57ff36b2c4f5b7fbf601660857622fc3

commit a4e2893b57ff36b2c4f5b7fbf601660857622fc3
Author: Xiyuan Xia <xiyuan@chromium.org>
Date: Wed May 23 01:55:25 2018

ws2: Wire up IME for WindowService

- Add IMERegistrarImpl and IMEDriverBridge to WindowService to provide
  IMERegistrar and IMEDriver mojo interface there;
- Chrome always call IMEDriver::Register to register its IME with
  WindowService;

Bug:  837710 
Change-Id: I39e91dda3643707346f58914022ed8beab75c636
Reviewed-on: https://chromium-review.googlesource.com/1069672
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Xiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560887}
[modify] https://crrev.com/a4e2893b57ff36b2c4f5b7fbf601660857622fc3/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc
[modify] https://crrev.com/a4e2893b57ff36b2c4f5b7fbf601660857622fc3/services/ui/ws2/BUILD.gn
[modify] https://crrev.com/a4e2893b57ff36b2c4f5b7fbf601660857622fc3/services/ui/ws2/window_service.cc
[modify] https://crrev.com/a4e2893b57ff36b2c4f5b7fbf601660857622fc3/services/ui/ws2/window_service.h

Blockedon: 681563
Project Member

Comment 11 by bugdroid1@chromium.org, May 24 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8eab247bc33ecf85628064629cb8fb7223cc794d

commit 8eab247bc33ecf85628064629cb8fb7223cc794d
Author: Xiyuan Xia <xiyuan@chromium.org>
Date: Thu May 24 22:04:11 2018

ws2: Wire IME for ash_shell_with_content

- Start test_ime_driver when ash_shell_with_content starts;
- Make test_ime_driver handle keystroke events in addition
  to char events used in tests;
- Make test_ime_driver call DispatchKeyEventPostIME before
  handling it, similar to InputMethodMinimal, so that non-input
  keystrokes such as backspace, arrow keys are handled;

Bug:  837710 
Change-Id: Ib70ac5e424ab7e30517200763b3cff0f9a9f13bd
Reviewed-on: https://chromium-review.googlesource.com/1070690
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Xiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561651}
[modify] https://crrev.com/8eab247bc33ecf85628064629cb8fb7223cc794d/ash/BUILD.gn
[modify] https://crrev.com/8eab247bc33ecf85628064629cb8fb7223cc794d/ash/shell/BUILD.gn
[modify] https://crrev.com/8eab247bc33ecf85628064629cb8fb7223cc794d/ash/shell/ash_shell_resources.grd
[modify] https://crrev.com/8eab247bc33ecf85628064629cb8fb7223cc794d/ash/shell/content/client/DEPS
[modify] https://crrev.com/8eab247bc33ecf85628064629cb8fb7223cc794d/ash/shell/content/client/shell_browser_main_parts.cc
[modify] https://crrev.com/8eab247bc33ecf85628064629cb8fb7223cc794d/ash/shell/content/client/shell_content_browser_client.cc
[modify] https://crrev.com/8eab247bc33ecf85628064629cb8fb7223cc794d/ash/shell/content/client/shell_main_delegate.cc
[modify] https://crrev.com/8eab247bc33ecf85628064629cb8fb7223cc794d/services/ui/ime/BUILD.gn
[modify] https://crrev.com/8eab247bc33ecf85628064629cb8fb7223cc794d/services/ui/ime/ime_unittest.cc
[add] https://crrev.com/8eab247bc33ecf85628064629cb8fb7223cc794d/services/ui/ime/test_ime_driver/public/mojom/BUILD.gn
[add] https://crrev.com/8eab247bc33ecf85628064629cb8fb7223cc794d/services/ui/ime/test_ime_driver/public/mojom/OWNERS
[add] https://crrev.com/8eab247bc33ecf85628064629cb8fb7223cc794d/services/ui/ime/test_ime_driver/public/mojom/constants.mojom
[modify] https://crrev.com/8eab247bc33ecf85628064629cb8fb7223cc794d/services/ui/ime/test_ime_driver/test_ime_driver.cc

Looks like we need to resolve  issue 681563  so that switching back and forth between mojo app window and browser window works as expected. Currently, once mojo app window is focused, its InputMethodChromeOS calls IMEBridge::SetInputContextHandler to set itself as the handler. It is not updated properly when the mojo app window loses focus.

Comment 13 by sky@chromium.org, May 29 2018

Status: Started (was: Assigned)
Project Member

Comment 14 by bugdroid1@chromium.org, Jun 1 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5f1046eedd0023f22789d32b0102eb1a2f47ec91

commit 5f1046eedd0023f22789d32b0102eb1a2f47ec91
Author: Xiyuan Xia <xiyuan@chromium.org>
Date: Fri Jun 01 16:04:44 2018

ws2: Handle IME focus change

- Add a ImeFocusHandler to call OnFocus/OnBlur on ash's singleton
  IME when focus moves back and forth between ash windows and
  ClientWindows;
- InputMethodMus closes mojo pipes when focus moves out of it;
- InputMethodBridge skips IME calls when its IME is not the currently
  active one to filter out asynchrouns mojo calls that comes in
  after its IME is deactivated;

Bug:  837710 ,  681563 
Change-Id: I70f426e331f0d29390bd8510a6dc809d0d698152
Reviewed-on: https://chromium-review.googlesource.com/1080015
Commit-Queue: Xiyuan Xia <xiyuan@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563658}
[modify] https://crrev.com/5f1046eedd0023f22789d32b0102eb1a2f47ec91/ash/BUILD.gn
[add] https://crrev.com/5f1046eedd0023f22789d32b0102eb1a2f47ec91/ash/ime/ime_focus_handler.cc
[add] https://crrev.com/5f1046eedd0023f22789d32b0102eb1a2f47ec91/ash/ime/ime_focus_handler.h
[add] https://crrev.com/5f1046eedd0023f22789d32b0102eb1a2f47ec91/ash/ime/ime_focus_handler_unittest.cc
[modify] https://crrev.com/5f1046eedd0023f22789d32b0102eb1a2f47ec91/ash/shell.cc
[modify] https://crrev.com/5f1046eedd0023f22789d32b0102eb1a2f47ec91/ash/shell.h
[modify] https://crrev.com/5f1046eedd0023f22789d32b0102eb1a2f47ec91/chrome/browser/ui/views/ime_driver/input_method_bridge_chromeos.cc
[modify] https://crrev.com/5f1046eedd0023f22789d32b0102eb1a2f47ec91/services/ui/ws2/window_service.cc
[modify] https://crrev.com/5f1046eedd0023f22789d32b0102eb1a2f47ec91/services/ui/ws2/window_service.h
[modify] https://crrev.com/5f1046eedd0023f22789d32b0102eb1a2f47ec91/ui/aura/mus/input_method_mus.cc
[modify] https://crrev.com/5f1046eedd0023f22789d32b0102eb1a2f47ec91/ui/base/ime/input_method_chromeos.cc

Status: Fixed (was: Started)

Sign in to add a comment