Hi,
I'd like to revive
http://crrev.com/849563002 somehow.
Since XkbKeyboardLayoutEngine already has SetKeymapFromStringForTest, could we
just drop "ForTest"? Then, we could either
1. Have the platform static_cast
KeyboardLayoutEngineManager::GetKeyboardLayoutEngine() to
XkbKeyboardLayoutEngine* before setting the layout.
2. Make SetKeymapFromString a virtual method method in KeyboardLayoutEngine, and
stub it out for all other subclasses.
I'm not sure how safe 1 is (is anything else allowed to call
SetKeyboardLayoutEngine?), and I'm not sure how much sense 2 makes (I would only
expect the XKB engine to know how to deal with XKB layout strings).
At first I was confused about the point of KeyboardLayoutEngineManager and why
the platform didn't own the KeyboardLayoutEngine, but I guess that's to prevent
a circular dependency between ozone and events? It looks like there is just one
call to GetKeyboardLayoutEngine from KeyEvent, but removing that seems to be
blocked on
http://crbug.com/444045.
--
Michael Forney <
for...@google.com>