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

Issue 10383301: Move modifier remapping code from X to Ash (Closed)

Created:
8 years, 7 months ago by Yusuke Sato
Modified:
8 years, 7 months ago
CC:
chromium-reviews, sadrul, nkostylev+watch_chromium.org, derat+watch_chromium.org, ben+watch_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org, yusukes+watch_chromium.org, mazda
Visibility:
Public.

Description

Move modifier remapping code from X to Ash. Doing modifier remapping in Ash would be better for the following reasons: - We can write full unit tests of the feature without relying on Autotests. The tests are included in this CL. - We can debug the remapping feature using Ash running on Goobuntu. - Much easier to maintain. We can remove 4k lines of auto-generated XKB script, /build/$BOARD/usr/share/X11/xkb/symbols/chromeos, which is difficult to read and understand. We no longer need to upgrade the 4k script every time when xorg-server is upgraded. - Easier to add more mappings. For example, now it's trivial to add a feature like 'remapping Search to ESC'. - We can also delete another auto-generated file in Chrome, src/chrome/browser/chromeos/input_method/xkeyboard_data.h. BUG=115112 TEST=manual and unit_tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=138988

Patch Set 1 : review #

Total comments: 28

Patch Set 2 : code review fixes #

Patch Set 3 : style fix #

Total comments: 2

Patch Set 4 : reverted ui/base/keycodes/keyboard_code_conversion_x.cc (this was just for debugging) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1573 lines, -969 lines) Patch
M chrome/browser/chromeos/input_method/mock_xkeyboard.h View 2 chunks +1 line, -3 lines 0 comments Download
M chrome/browser/chromeos/input_method/mock_xkeyboard.cc View 2 chunks +1 line, -6 lines 0 comments Download
M chrome/browser/chromeos/input_method/xkeyboard.h View 5 chunks +1 line, -27 lines 0 comments Download
M chrome/browser/chromeos/input_method/xkeyboard.cc View 19 chunks +23 lines, -183 lines 0 comments Download
D chrome/browser/chromeos/input_method/xkeyboard_data.h View 1 chunk +0 lines, -66 lines 0 comments Download
M chrome/browser/chromeos/input_method/xkeyboard_unittest.cc View 3 chunks +11 lines, -166 lines 0 comments Download
M chrome/browser/chromeos/preferences.h View 2 chunks +0 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/preferences.cc View 3 chunks +0 lines, -44 lines 0 comments Download
M chrome/browser/ui/views/ash/key_rewriter.h View 1 6 chunks +35 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/ash/key_rewriter.cc View 1 2 3 5 chunks +231 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/ash/key_rewriter_unittest.cc View 1 2 5 chunks +1270 lines, -464 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
Yusuke Sato
Zach, could you review chrome/browser/chromeos/ part?
8 years, 7 months ago (2012-05-23 13:26:29 UTC) #1
Yusuke Sato
+derat Could you review KeyRewriter part?
8 years, 7 months ago (2012-05-23 15:54:06 UTC) #2
Daniel Erat
http://codereview.chromium.org/10383301/diff/10001/chrome/browser/ui/views/ash/key_rewriter.cc File chrome/browser/ui/views/ash/key_rewriter.cc (right): http://codereview.chromium.org/10383301/diff/10001/chrome/browser/ui/views/ash/key_rewriter.cc#newcode45 chrome/browser/ui/views/ash/key_rewriter.cc:45: unsigned int native_keysyms[4]; // left, right, shift+left, shift+right. nit: ...
8 years, 7 months ago (2012-05-23 16:37:32 UTC) #3
Yusuke Sato
Please take another look. http://codereview.chromium.org/10383301/diff/10001/chrome/browser/ui/views/ash/key_rewriter.cc File chrome/browser/ui/views/ash/key_rewriter.cc (right): http://codereview.chromium.org/10383301/diff/10001/chrome/browser/ui/views/ash/key_rewriter.cc#newcode45 chrome/browser/ui/views/ash/key_rewriter.cc:45: unsigned int native_keysyms[4]; // left, ...
8 years, 7 months ago (2012-05-24 08:24:41 UTC) #4
Zachary Kuznia
LGTM for chromeos/
8 years, 7 months ago (2012-05-24 09:50:30 UTC) #5
Daniel Erat
lgtm https://chromiumcodereview.appspot.com/10383301/diff/24002/chrome/browser/ui/views/ash/key_rewriter.cc File chrome/browser/ui/views/ash/key_rewriter.cc (right): https://chromiumcodereview.appspot.com/10383301/diff/24002/chrome/browser/ui/views/ash/key_rewriter.cc#newcode43 chrome/browser/ui/views/ash/key_rewriter.cc:43: unsigned int native_modifier; nit: s/modifier/modifiers/ (since there are ...
8 years, 7 months ago (2012-05-24 14:55:11 UTC) #6
Yusuke Sato
http://codereview.chromium.org/10383301/diff/24002/chrome/browser/ui/views/ash/key_rewriter.cc File chrome/browser/ui/views/ash/key_rewriter.cc (right): http://codereview.chromium.org/10383301/diff/24002/chrome/browser/ui/views/ash/key_rewriter.cc#newcode43 chrome/browser/ui/views/ash/key_rewriter.cc:43: unsigned int native_modifier; On 2012/05/24 14:55:12, Daniel Erat wrote: ...
8 years, 7 months ago (2012-05-25 01:34:15 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yusukes@chromium.org/10383301/20003
8 years, 7 months ago (2012-05-25 02:26:44 UTC) #8
commit-bot: I haz the power
8 years, 7 months ago (2012-05-25 04:16:09 UTC) #9
Change committed as 138988

Powered by Google App Engine
This is Rietveld 408576698