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

Issue 3748002: Add a message pump for touchui=1 (Closed)

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

Description

Add a message pump for touchui=1 The message pump reads events directly from X. For most events, it passes them on to GDK for normal processing. It consumes some events (e.g. keypress events) to demonstrate how it's intended to work. This, of course, makes chrome mostly unusable since you can only use the mouse to do things. But this is a small first step towards capturing events through MPX (e.g. touch etc.) and processing them as chrome pleases. glib message pump: Slightly change architecture This changeset breaks down the glib message pump a little so that it can be easily subclassed. The next set of commits will introduce a subclass that still uses GTK and GDK widgets, but reads events directly from X instead of through GTK/GDK. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=63397 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=63519

Patch Set 1 #

Total comments: 18

Patch Set 2 : Renamed to MessagePumpGlibX, corrected style, added comments. #

Total comments: 17

Patch Set 3 : Remove the file that keeps getting added. #

Patch Set 4 : Addressed the issues. #

Total comments: 4

Patch Set 5 : Use bitset and use X11 header cleanly. #

Total comments: 19

Patch Set 6 : Follow styles, add comments. #

Total comments: 4

Patch Set 7 : Move code around a little bit. #

Patch Set 8 : Merge fix. #

Patch Set 9 : Trying to fix the build failures for the trybots. #

Patch Set 10 : GTK+ version check to pass compile in trybots. #

Total comments: 3

Patch Set 11 : Simplifying code for older GTK+ versions. #

Patch Set 12 : gyp magic to fix build failure (hopefully). #

Unified diffs Side-by-side diffs Delta from patch set Stats (+209 lines, -14 lines) Patch
M base/base.gypi View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +7 lines, -0 lines 0 comments Download
M base/message_loop.cc View 1 2 3 4 5 6 7 3 chunks +8 lines, -2 lines 0 comments Download
M base/message_pump_glib.h View 1 2 3 2 chunks +9 lines, -0 lines 0 comments Download
M base/message_pump_glib.cc View 1 2 3 4 5 6 3 chunks +18 lines, -12 lines 0 comments Download
A base/message_pump_glib_x.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +63 lines, -0 lines 0 comments Download
A base/message_pump_glib_x.cc View 1 2 3 4 5 9 1 chunk +104 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
sadrul
http://codereview.chromium.org/3748002/diff/1/8 File chrome/browser/resources/network_menu.js (right): http://codereview.chromium.org/3748002/diff/1/8#newcode21 chrome/browser/resources/network_menu.js:21: initMenuItem_: function() { The changes in the file are ...
10 years, 2 months ago (2010-10-13 15:50:06 UTC) #1
rjkroege
http://codereview.chromium.org/3748002/diff/1/4 File base/message_pump_glib.cc (right): http://codereview.chromium.org/3748002/diff/1/4#newcode234 base/message_pump_glib.cc:234: bool MessagePumpForUI::RunOnce(GMainContext *context, bool block) { in Chrome land, ...
10 years, 2 months ago (2010-10-13 18:24:49 UTC) #2
sadrul
http://codereview.chromium.org/3748002/diff/1/4 File base/message_pump_glib.cc (right): http://codereview.chromium.org/3748002/diff/1/4#newcode234 base/message_pump_glib.cc:234: bool MessagePumpForUI::RunOnce(GMainContext *context, bool block) { On 2010/10/13 18:24:50, ...
10 years, 2 months ago (2010-10-13 21:13:04 UTC) #3
sadrul
> > beb1bcb6ef299e302a5d877fd006686710a2bc4e. I am not entirely sure how this > > managed to sneak ...
10 years, 2 months ago (2010-10-13 21:14:03 UTC) #4
rjkroege
http://codereview.chromium.org/3748002/diff/10001/6004 File base/message_pump_glib.cc (right): http://codereview.chromium.org/3748002/diff/10001/6004#newcode234 base/message_pump_glib.cc:234: bool MessagePumpForUI::RunOnce(GMainContext *context, bool block) { GMainContext *context -> ...
10 years, 2 months ago (2010-10-13 22:04:42 UTC) #5
sadrul
http://codereview.chromium.org/3748002/diff/10001/6006 File base/message_pump_glib_x.cc (right): http://codereview.chromium.org/3748002/diff/10001/6006#newcode23 base/message_pump_glib_x.cc:23: DCHECK(COUNT_EVENTS >= LASTEvent); On 2010/10/13 22:04:42, rjkroege wrote: > ...
10 years, 2 months ago (2010-10-14 09:53:09 UTC) #6
sadrul
http://codereview.chromium.org/3748002/diff/10001/6004 File base/message_pump_glib.cc (right): http://codereview.chromium.org/3748002/diff/10001/6004#newcode234 base/message_pump_glib.cc:234: bool MessagePumpForUI::RunOnce(GMainContext *context, bool block) { On 2010/10/13 22:04:42, ...
10 years, 2 months ago (2010-10-14 13:31:15 UTC) #7
rjkroege
http://codereview.chromium.org/3748002/diff/19001/20005 File base/message_pump_glib_x.cc (right): http://codereview.chromium.org/3748002/diff/19001/20005#newcode25 base/message_pump_glib_x.cc:25: DCHECK(GDK_EVENT_LAST >= LASTEvent); I'm still not happy about this ...
10 years, 2 months ago (2010-10-14 15:08:12 UTC) #8
sadrul
Uploaded a new patch that uses bitset and includes header files correctly and cleanly. http://codereview.chromium.org/3748002/diff/19001/20005 ...
10 years, 2 months ago (2010-10-14 15:17:31 UTC) #9
sadrul
http://codereview.chromium.org/3748002/diff/29001/18003 File base/message_loop.cc (right): http://codereview.chromium.org/3748002/diff/29001/18003#newcode542 base/message_loop.cc:542: bool MessageLoop::DoDelayedWork(base::Time* next_delayed_work_time) { It was necessary to disambiguate ...
10 years, 2 months ago (2010-10-14 15:19:05 UTC) #10
sky
You need to get someone that knows about the messageloop on X to review this. ...
10 years, 2 months ago (2010-10-14 16:13:33 UTC) #11
Evan Martin
I don't understand your underlying design. I feel like we've discussed this before, so maybe ...
10 years, 2 months ago (2010-10-14 16:26:29 UTC) #12
rjkroege
On Thu, Oct 14, 2010 at 12:26 PM, <evan@chromium.org> wrote: > I don't understand your ...
10 years, 2 months ago (2010-10-15 14:35:05 UTC) #13
Evan Martin
I've said my piece (that I am skeptical this route will work, and that you ...
10 years, 2 months ago (2010-10-15 16:28:32 UTC) #14
sadrul
Thanks! I have addressed your concerns. It's taking me a little time to get used ...
10 years, 2 months ago (2010-10-15 17:14:26 UTC) #15
Evan Martin
Looks great, just one more thought on DispatchEvents() http://codereview.chromium.org/3748002/diff/9/17004 File base/message_pump_glib.cc (right): http://codereview.chromium.org/3748002/diff/9/17004#newcode345 base/message_pump_glib.cc:345: MessagePumpForUI* ...
10 years, 2 months ago (2010-10-15 17:37:55 UTC) #16
sadrul
http://codereview.chromium.org/3748002/diff/9/17004 File base/message_pump_glib.cc (right): http://codereview.chromium.org/3748002/diff/9/17004#newcode345 base/message_pump_glib.cc:345: MessagePumpForUI* message_pump = reinterpret_cast<MessagePumpForUI*>(data); On 2010/10/15 17:37:55, Evan Martin ...
10 years, 2 months ago (2010-10-15 18:28:39 UTC) #17
Evan Martin
LGTM
10 years, 2 months ago (2010-10-15 18:37:22 UTC) #18
sadrul
http://codereview.chromium.org/3748002/diff/48001/49006 File base/message_pump_glib_x.h (right): http://codereview.chromium.org/3748002/diff/48001/49006#newcode54 base/message_pump_glib_x.h:54: Older versions of GTK+ (GDK) does not have GDK_EVENT_LAST, ...
10 years, 2 months ago (2010-10-20 15:42:53 UTC) #19
Evan Martin
LGTM, consider simplifying http://codereview.chromium.org/3748002/diff/48001/49006 File base/message_pump_glib_x.h (right): http://codereview.chromium.org/3748002/diff/48001/49006#newcode48 base/message_pump_glib_x.h:48: #elif GTK_CHECK_VERSION(2,8,0) I think we require ...
10 years, 2 months ago (2010-10-20 16:08:33 UTC) #20
sadrul
http://codereview.chromium.org/3748002/diff/48001/49006 File base/message_pump_glib_x.h (right): http://codereview.chromium.org/3748002/diff/48001/49006#newcode48 base/message_pump_glib_x.h:48: #elif GTK_CHECK_VERSION(2,8,0) On 2010/10/20 16:08:34, Evan Martin wrote: > ...
10 years, 2 months ago (2010-10-20 16:34:20 UTC) #21
sadrul
10 years, 2 months ago (2010-10-20 16:34:22 UTC) #22
Evan Martin
LGTM++
10 years, 2 months ago (2010-10-20 16:36:37 UTC) #23
sadrul
10 years, 2 months ago (2010-10-22 01:20:01 UTC) #24
The build failure caused by this patch shows up only in some cases. I could not
reproduce the problem. But Matt Mueller (mattm_g) could and he tested the fix
for the build failure.

Powered by Google App Engine
This is Rietveld 408576698