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

Issue 3801011: touchui: Directly process key and mouse events. (Closed)

Created:
10 years, 2 months ago by sadrul
Modified:
9 years, 6 months ago
Reviewers:
rjkroege, wyck, sky, Evan Martin
CC:
chromium-reviews, brettw-cc_chromium.org, ben+cc_chromium.org, davemoore+watch_chromium.org
Base URL:
http://src.chromium.org/git/chromium.git
Visibility:
Public.

Description

touchui: Directly process key and mouse events. Capture the keyboard and mouse events directly from X, create a corresponding views::Event out of it, and send it to the associated RootView. Includes Chad's (wyck) function FindRootViewForGdkEvent (from #3704005) slightly modified (called FindRootViewForGdkWindow). BUG=None TEST=Click/Keypress events in a webpage should work correctly. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=63916

Patch Set 1 #

Patch Set 2 : Fixed up the style errors. #

Total comments: 15

Patch Set 3 : Remove views dependency from base. #

Patch Set 4 : Style and comment fixes. #

Total comments: 20

Patch Set 5 : Address sky's comments, and move code conversion into app. #

Patch Set 6 : Address comments I missed. #

Total comments: 24

Patch Set 7 : Styles and comments. #

Patch Set 8 : Use Event constructors for cleaner code. #

Total comments: 4

Patch Set 9 : Address sky's issues. #

Total comments: 5

Patch Set 10 : Removed now-unnecessary code. Clean and merge the rest. #

Patch Set 11 : Include a fix to detect the correct button for mouseclicks. #

Total comments: 11

Patch Set 12 : Address most of sky's concerns. #

Total comments: 10

Patch Set 13 : Clean up MouseEvent construction. #

Patch Set 14 : Merge with trunk (and update for NestedDispatcherGtk). #

Total comments: 8

Patch Set 15 : Fix build with toolkit_view=1 and touchui=0 #

Patch Set 16 : Address nits. #

Total comments: 12

Patch Set 17 : Add/Sanitize comments. #

Total comments: 4

Patch Set 18 : nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+542 lines, -286 lines) Patch
M app/app_base.gypi View 3 chunks +6 lines, -0 lines 0 comments Download
A app/keyboard_code_conversion_x.h View 5 6 1 chunk +18 lines, -0 lines 0 comments Download
A app/keyboard_code_conversion_x.cc View 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +163 lines, -0 lines 0 comments Download
M base/base.gypi View 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M base/message_loop.h View 3 4 5 6 7 8 9 10 11 12 13 2 chunks +7 lines, -0 lines 0 comments Download
M base/message_pump_glib.h View 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M base/message_pump_glib.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M base/message_pump_glib_x.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +20 lines, -7 lines 0 comments Download
A base/message_pump_glib_x_dispatch.h View 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +28 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/views/native_menu_domui.h View 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/views/native_menu_domui.cc View 14 15 2 chunks +10 lines, -0 lines 0 comments Download
M views/controls/menu/menu_controller.h View 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M views/controls/menu/menu_controller.cc View 3 4 5 6 7 8 2 chunks +12 lines, -1 line 0 comments Download
M views/controls/menu/native_menu_gtk.h View 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -0 lines 0 comments Download
M views/controls/menu/native_menu_gtk.cc View 3 4 5 6 7 8 9 10 11 12 13 2 chunks +10 lines, -0 lines 0 comments Download
M views/controls/menu/nested_dispatcher_gtk.h View 2 chunks +9 lines, -1 line 0 comments Download
M views/controls/menu/nested_dispatcher_gtk.cc View 14 15 2 chunks +15 lines, -0 lines 0 comments Download
M views/event.h View 3 4 8 9 10 11 12 3 chunks +13 lines, -0 lines 0 comments Download
A views/event_x.cc View 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +117 lines, -0 lines 0 comments Download
M views/focus/accelerator_handler.h View 3 4 5 6 7 8 2 chunks +9 lines, -0 lines 0 comments Download
M views/focus/accelerator_handler_gtk.cc View 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M views/focus/accelerator_handler_touch.cc View 8 9 10 11 12 13 14 15 1 chunk +78 lines, -13 lines 0 comments Download
D views/touchui/touch_event_dispatcher_gtk.h View 1 chunk +0 lines, -18 lines 0 comments Download
D views/touchui/touch_event_dispatcher_gtk.cc View 1 chunk +0 lines, -243 lines 0 comments Download
M views/views.gyp View 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 32 (0 generated)
sadrul
This goes on top of http://codereview.chromium.org/3748002/show
10 years, 2 months ago (2010-10-18 15:17:30 UTC) #1
sadrul
10 years, 2 months ago (2010-10-18 17:08:55 UTC) #2
sky
http://codereview.chromium.org/3801011/diff/3001/4001 File base/message_pump_glib_x.cc (right): http://codereview.chromium.org/3801011/diff/3001/4001#newcode8 base/message_pump_glib_x.cc:8: #include "views/event.h" base can't have a dependency on views.
10 years, 2 months ago (2010-10-18 17:14:45 UTC) #3
rjkroege
http://codereview.chromium.org/3801011/diff/3001/4001 File base/message_pump_glib_x.cc (right): http://codereview.chromium.org/3801011/diff/3001/4001#newcode21 base/message_pump_glib_x.cc:21: // TODO(sad): Have |keysym| go through the X map ...
10 years, 2 months ago (2010-10-18 17:36:49 UTC) #4
rjkroege
On 2010/10/18 17:14:45, sky wrote: > http://codereview.chromium.org/3801011/diff/3001/4001 > File base/message_pump_glib_x.cc (right): > > http://codereview.chromium.org/3801011/diff/3001/4001#newcode8 > ...
10 years, 2 months ago (2010-10-18 17:52:51 UTC) #5
sky
On Mon, Oct 18, 2010 at 10:52 AM, <rjkroege@chromium.org> wrote: > On 2010/10/18 17:14:45, sky ...
10 years, 2 months ago (2010-10-18 19:12:09 UTC) #6
sadrul
I have addressed most of Rob's suggestions. I have also removed views-dependency from base to ...
10 years, 2 months ago (2010-10-19 15:33:46 UTC) #7
sky
You need to get someone intimately familiar with the messageloop to review this patch. Evan ...
10 years, 2 months ago (2010-10-19 15:51:10 UTC) #8
sadrul
http://codereview.chromium.org/3801011/diff/14001/15002 File base/message_loop.h (right): http://codereview.chromium.org/3801011/diff/14001/15002#newcode28 base/message_loop.h:28: #if defined(TOUCH_UI) On 2010/10/19 15:51:10, sky wrote: > move ...
10 years, 2 months ago (2010-10-19 16:49:20 UTC) #9
rjkroege
http://codereview.chromium.org/3801011/diff/26001/23003 File app/keyboard_code_conversion_x.cc (right): http://codereview.chromium.org/3801011/diff/26001/23003#newcode154 app/keyboard_code_conversion_x.cc:154: // TODO(sad): holy-crap-a-lot are still missing. Change this -- ...
10 years, 2 months ago (2010-10-19 18:42:44 UTC) #10
sadrul
http://codereview.chromium.org/3801011/diff/26001/23003 File app/keyboard_code_conversion_x.cc (right): http://codereview.chromium.org/3801011/diff/26001/23003#newcode154 app/keyboard_code_conversion_x.cc:154: // TODO(sad): holy-crap-a-lot are still missing. On 2010/10/19 18:42:45, ...
10 years, 2 months ago (2010-10-19 19:39:14 UTC) #11
sadrul
Since #3704005 has landed, I have updated my patch accordingly my moving the changes from ...
10 years, 2 months ago (2010-10-21 19:12:53 UTC) #12
sky
http://codereview.chromium.org/3801011/diff/37001/38014 File views/event.h (right): http://codereview.chromium.org/3801011/diff/37001/38014#newcode231 views/event.h:231: explicit MouseEvent(XEvent* xevent, bool drag); no explicit http://codereview.chromium.org/3801011/diff/37001/38016 File ...
10 years, 2 months ago (2010-10-21 19:41:42 UTC) #13
sadrul
http://codereview.chromium.org/3801011/diff/37001/38014 File views/event.h (right): http://codereview.chromium.org/3801011/diff/37001/38014#newcode231 views/event.h:231: explicit MouseEvent(XEvent* xevent, bool drag); On 2010/10/21 19:41:42, sky ...
10 years, 2 months ago (2010-10-21 20:17:44 UTC) #14
sky
http://codereview.chromium.org/3801011/diff/44001/45015 File views/event_x.cc (right): http://codereview.chromium.org/3801011/diff/44001/45015#newcode23 views/event_x.cc:23: RootView* FindRootViewForGdkWindow(GdkWindow* gdk_window) { Can you merge now? http://codereview.chromium.org/3801011/diff/44001/45015#newcode86 ...
10 years, 2 months ago (2010-10-21 20:26:17 UTC) #15
sadrul
http://codereview.chromium.org/3801011/diff/44001/45015 File views/event_x.cc (right): http://codereview.chromium.org/3801011/diff/44001/45015#newcode23 views/event_x.cc:23: RootView* FindRootViewForGdkWindow(GdkWindow* gdk_window) { On 2010/10/21 20:26:17, sky wrote: ...
10 years, 2 months ago (2010-10-22 01:30:38 UTC) #16
sadrul
I have removed some now-unnecessary code and merged with wyck's CL. http://codereview.chromium.org/3801011/diff/44001/45015 File views/event_x.cc (right): ...
10 years, 2 months ago (2010-10-22 03:57:22 UTC) #17
sky
http://codereview.chromium.org/3801011/diff/46002/59014 File views/event.h (right): http://codereview.chromium.org/3801011/diff/46002/59014#newcode230 views/event.h:230: explicit MouseEvent(XEvent* xevent); Do we really need both of ...
10 years, 2 months ago (2010-10-22 15:28:59 UTC) #18
sadrul
http://codereview.chromium.org/3801011/diff/46002/59014 File views/event.h (right): http://codereview.chromium.org/3801011/diff/46002/59014#newcode230 views/event.h:230: explicit MouseEvent(XEvent* xevent); On 2010/10/22 15:28:59, sky wrote: > ...
10 years, 2 months ago (2010-10-22 16:10:40 UTC) #19
sky
http://codereview.chromium.org/3801011/diff/46002/59014 File views/event.h (right): http://codereview.chromium.org/3801011/diff/46002/59014#newcode230 views/event.h:230: explicit MouseEvent(XEvent* xevent); On 2010/10/22 16:10:40, sadrul wrote: > ...
10 years, 2 months ago (2010-10-22 18:08:20 UTC) #20
rjkroege
http://codereview.chromium.org/3801011/diff/65001/66005 File base/message_loop.h (right): http://codereview.chromium.org/3801011/diff/65001/66005#newcode28 base/message_loop.h:28: #endif I am suspecting that some of these changes ...
10 years, 2 months ago (2010-10-22 18:09:35 UTC) #21
sadrul
http://codereview.chromium.org/3801011/diff/65001/66005 File base/message_loop.h (right): http://codereview.chromium.org/3801011/diff/65001/66005#newcode28 base/message_loop.h:28: #endif On 2010/10/22 18:09:35, rjkroege wrote: > I am ...
10 years, 2 months ago (2010-10-22 18:47:03 UTC) #22
sadrul
On 2010/10/22 18:08:20, sky wrote: > http://codereview.chromium.org/3801011/diff/46002/59014 > File views/event.h (right): > > http://codereview.chromium.org/3801011/diff/46002/59014#newcode230 > ...
10 years, 2 months ago (2010-10-22 18:51:08 UTC) #23
rjkroege
LGTM.
10 years, 2 months ago (2010-10-22 19:32:43 UTC) #24
sky
LGTM, but you need sign off from Evan or someone on the message loop changes. ...
10 years, 2 months ago (2010-10-23 00:04:55 UTC) #25
sadrul
I have now updated the patch to cleanly merge with trunk (there were some merge ...
10 years, 2 months ago (2010-10-25 14:02:44 UTC) #26
sky
LGTM with the following nits fixed. http://codereview.chromium.org/3801011/diff/77001/39016 File chrome/browser/chromeos/views/native_menu_domui.cc (right): http://codereview.chromium.org/3801011/diff/77001/39016#newcode24 chrome/browser/chromeos/views/native_menu_domui.cc:24: #if defined(TOUCH_UI) newline ...
10 years, 2 months ago (2010-10-25 17:13:52 UTC) #27
sadrul
Thanks! Made the suggested changes. Evan, could you PTAL! :) http://codereview.chromium.org/3801011/diff/77001/39016 File chrome/browser/chromeos/views/native_menu_domui.cc (right): http://codereview.chromium.org/3801011/diff/77001/39016#newcode24 ...
10 years, 2 months ago (2010-10-25 17:30:34 UTC) #28
Evan Martin
LGTM, minor nits follow (I only skimmed the views/ code) http://codereview.chromium.org/3801011/diff/87001/88002 File app/keyboard_code_conversion_x.cc (right): http://codereview.chromium.org/3801011/diff/87001/88002#newcode154 ...
10 years, 2 months ago (2010-10-25 17:44:29 UTC) #29
sadrul
Added some new comments, and sanitized a few existing comments. Also corrected the order of ...
10 years, 2 months ago (2010-10-25 18:23:29 UTC) #30
rjkroege
still LGTM. please remember to add the test that I mention as part of the ...
10 years, 2 months ago (2010-10-25 19:01:07 UTC) #31
sadrul
10 years, 2 months ago (2010-10-25 19:07:50 UTC) #32
I will add unit-test(s) in subsequent CLs.

http://codereview.chromium.org/3801011/diff/94001/95002
File app/keyboard_code_conversion_x.cc (right):

http://codereview.chromium.org/3801011/diff/94001/95002#newcode156
app/keyboard_code_conversion_x.cc:156: // TODO(sad): A lot of keycodes still
missing.
On 2010/10/25 19:01:08, rjkroege wrote:
> add "are"

Done.

http://codereview.chromium.org/3801011/diff/94001/95022
File views/focus/accelerator_handler_touch.cc (right):

http://codereview.chromium.org/3801011/diff/94001/95022#newcode20
views/focus/accelerator_handler_touch.cc:20: RootView*
FindRootViewForGdkWindow(GdkWindow* gdk_window) {
On 2010/10/25 19:01:08, rjkroege wrote:
> In a subsequent CL, as you finish wiring this up to the RWHVV etc., this code
> ought to have a unit test.

Noted.

Powered by Google App Engine
This is Rietveld 408576698