summaryrefslogtreecommitdiffstats
path: root/ui/base/ime/win
diff options
context:
space:
mode:
authorYukawa@chromium.org <Yukawa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-13 16:13:35 +0000
committerYukawa@chromium.org <Yukawa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-13 16:13:35 +0000
commit38ef5018776ab633f1b2fcafaf456b453a6be8f6 (patch)
treead1c108ecae06b755bfe41d4c6699a3976ba40ad /ui/base/ime/win
parent81b4bbd6e5edaa9449c2d48e2ffc5e58318694e1 (diff)
downloadchromium_src-38ef5018776ab633f1b2fcafaf456b453a6be8f6.zip
chromium_src-38ef5018776ab633f1b2fcafaf456b453a6be8f6.tar.gz
chromium_src-38ef5018776ab633f1b2fcafaf456b453a6be8f6.tar.bz2
Add sticky focus mechanism into ui::InputMethod
Currently there are two callers of ui::InputMethod::SetFocusedTextInputClient. One is RenderWidgetHostViewAura and the other is ui::views::InputMethodBridge. This makes it hard to implement ui::InputMethod correctly because these callers work independently to each other. As a tentative solution, this CL introduces "sticky" focus mechanism to solve this problem. It will be used as follows in the next CL. 1. RWHVA calls SetStickyFocusedTextInputClient(this) -> "FocusedTextInputClient" is locked to RWHVA 2. InputMethodBridge calls SetFocusedTextInputClient(this) -> This will be ignored because RWHVA already locked the focus. 3. RWHVA calls SetStickyFocusedTextInputClient(NULL) -> "FocusedTextInputClient" is unlocked 4. InputMethodBridge calls SetFocusedTextInputClient(this) -> "FocusedTextInputClient" is set to InputMethodBridge In short, InputMethodBridge can gain text input focus as long as RWHVA does not own the input focus. This special rule solves the problem. In a long term solution, @nona is working on an unified text input client focus manager, which is expected to replace this sticky focus mechanism. I hope it will happen near future. This CL also fixes a minor issue that InputMethodBase::On{Will/Did}ChangeFocusedClient are called redundantly when InputMethod::SetFocusedTextInputClient is called twice or more. Except for this minor fix, there CL never changes the production code. BUG=287620 TEST=Ran unit tests. Manually done with/without --enable-text-services-framework on Aura/non-Aura Windows 7. Review URL: https://chromiumcodereview.appspot.com/23754015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223054 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/ime/win')
0 files changed, 0 insertions, 0 deletions