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

Issue 7011005: Use observer for an X message pump to intercept keyevents for volume control. (Closed)

Created:
9 years, 7 months ago by sadrul
Modified:
9 years, 6 months ago
Reviewers:
Daniel Erat, DaveMoore
CC:
chromium-reviews, davemoore+watch_chromium.org
Visibility:
Public.

Description

Use observer for an X message pump to intercept keyevents for volume control. BUG=none TEST=Pressed F8/F9/F10 keys on chromeos builds with and without touchui on the desktop and saw the volume-control bubble show up. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=85723

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 5

Patch Set 3 : Remove observer #

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -30 lines) Patch
M chrome/browser/chromeos/system_key_event_listener.h View 1 3 chunks +14 lines, -1 line 0 comments Download
M chrome/browser/chromeos/system_key_event_listener.cc View 1 2 3 6 chunks +47 lines, -29 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
sadrul
http://codereview.chromium.org/7011005/diff/1001/chrome/browser/chromeos/system_key_event_listener.h File chrome/browser/chromeos/system_key_event_listener.h (right): http://codereview.chromium.org/7011005/diff/1001/chrome/browser/chromeos/system_key_event_listener.h#newcode67 chrome/browser/chromeos/system_key_event_listener.h:67: OVERRIDE This is kind of ugly.
9 years, 7 months ago (2011-05-11 20:53:50 UTC) #1
sadrul
+derat
9 years, 7 months ago (2011-05-16 18:40:44 UTC) #2
Daniel Erat
Please describe what you did to test the change in the TEST= section of your ...
9 years, 7 months ago (2011-05-16 18:46:36 UTC) #3
sadrul
http://codereview.chromium.org/7011005/diff/1001/chrome/browser/chromeos/system_key_event_listener.cc File chrome/browser/chromeos/system_key_event_listener.cc (right): http://codereview.chromium.org/7011005/diff/1001/chrome/browser/chromeos/system_key_event_listener.cc#newcode53 chrome/browser/chromeos/system_key_event_listener.cc:53: MessageLoopForUI::current()->AddObserver(this); On 2011/05/16 18:46:36, Daniel Erat wrote: > do ...
9 years, 7 months ago (2011-05-16 19:58:05 UTC) #4
Daniel Erat
9 years, 7 months ago (2011-05-16 21:47:20 UTC) #5
LGTM

On 2011/05/16 19:58:05, sadrul wrote:
> On 2011/05/16 18:46:36, Daniel Erat wrote:
> > This was broken before this change, but I figure it's worth pointing out:
X's
> > keycode-to-keysym mapping can be changed at runtime; a MappingNotify event
is
> > sent to all clients in this case.  The right thing to do then is to ungrab
any
> > keycodes that are no longer used and grab new ones.  It's probably not a
> concern
> > for these particular keys, since it's unlikely that the volume or function
> keys
> > would be remapped.
> 
> Should this change be in a separate CL?

Yeah, it shouldn't happen in this one -- maybe just add a TODO now and/or file a
bug?

Powered by Google App Engine
This is Rietveld 408576698