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

Issue 4098003: Handle volume keys within Chrome (Closed)

Created:
10 years, 2 months ago by davejcool
Modified:
9 years, 7 months ago
CC:
chromium-reviews, nkostylev+cc_chromium.org, davemoore+watch_chromium.org, ben+cc_chromium.org
Visibility:
Public.

Description

Volume Up/Down/Mute are handled within Chrome itself, without depending on Window Manager. The SystemKeyEventListener keyboard filter is instantiated in screen_locker as well as browser_init, so these keys will be handled at the screen lock and when logged in. The on-screen UI is shown when logged in, but currently is not being allowed to show at screen lock. (A screen lock can be forced with /usr/bin/powerd_lock_screen). After this patch, keyboard handling within Chrome supersedes the key handling in window_manager.cc, and so that functionality can safely be removed (http://codereview.chromium.org/4159004) and chromeos_wm_ipc_enums.h (http://codereview.chromium.org/4172004). Related bug is http://crosbug.com/6074 . BUG=chromium-os:6074 TEST=Volume Up/Down and Mute keys should work when screen is locked and when logged in normally. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=64709

Patch Set 1 : patch #

Total comments: 4

Patch Set 2 : formatting #

Total comments: 1

Patch Set 3 : nit fix #

Total comments: 1

Patch Set 4 : Using XGrabKey #

Total comments: 4

Patch Set 5 : fixed formatting #

Total comments: 11

Patch Set 6 : more nit fixing #

Patch Set 7 : Backed out caching Singleton instance #

Unified diffs Side-by-side diffs Delta from patch set Stats (+122 lines, -49 lines) Patch
M chrome/browser/browser_init.cc View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/login/screen_locker.cc View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/system_key_event_listener.h View 1 2 3 4 5 2 chunks +28 lines, -9 lines 0 comments Download
M chrome/browser/chromeos/system_key_event_listener.cc View 1 2 3 4 5 6 3 chunks +85 lines, -36 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
davejcool
Hi, I was looking at fixing this since currently if the audio was playing when ...
10 years, 1 month ago (2010-10-27 01:52:14 UTC) #1
Daniel Erat
Thanks for doing this! I think that the volume bubble not showing up when the ...
10 years, 1 month ago (2010-10-27 06:27:08 UTC) #2
davejcool
Did some formatting... and re-ordering to match header better. http://codereview.chromium.org/4098003/diff/10002/20003 File chrome/browser/chromeos/system_key_event_listener.cc (right): http://codereview.chromium.org/4098003/diff/10002/20003#newcode25 chrome/browser/chromeos/system_key_event_listener.cc:25: ...
10 years, 1 month ago (2010-10-27 18:52:55 UTC) #3
Daniel Erat
Thanks, LGTM. http://codereview.chromium.org/4098003/diff/27001/28001 File chrome/browser/browser_init.cc (right): http://codereview.chromium.org/4098003/diff/27001/28001#newcode406 chrome/browser/browser_init.cc:406: // messages regardless of focus nit: add ...
10 years, 1 month ago (2010-10-27 19:00:55 UTC) #4
scherkus (not reviewing)
LGTM http://codereview.chromium.org/4098003/diff/31001/2004 File chrome/browser/chromeos/system_key_event_listener.cc (right): http://codereview.chromium.org/4098003/diff/31001/2004#newcode84 chrome/browser/chromeos/system_key_event_listener.cc:84: // TODO(davej): This fucntion will be removed once ...
10 years, 1 month ago (2010-10-27 22:59:18 UTC) #5
davejcool
A keyboard filter is now inserted to grab the volume keys, instead of relying on ...
10 years, 1 month ago (2010-10-30 00:25:59 UTC) #6
tfarina
LGTM with the following changes. http://codereview.chromium.org/4098003/diff/34001/35003 File chrome/browser/chromeos/system_key_event_listener.cc (right): http://codereview.chromium.org/4098003/diff/34001/35003#newcode79 chrome/browser/chromeos/system_key_event_listener.cc:79: uint32 NumLockMask = Mod2Mask; ...
10 years, 1 month ago (2010-10-30 00:31:27 UTC) #7
Daniel Erat
LGTM with Thiago's suggestions. http://codereview.chromium.org/4098003/diff/34001/35003 File chrome/browser/chromeos/system_key_event_listener.cc (right): http://codereview.chromium.org/4098003/diff/34001/35003#newcode65 chrome/browser/chromeos/system_key_event_listener.cc:65: } else if ((keycode == ...
10 years, 1 month ago (2010-10-30 16:13:50 UTC) #8
davejcool
Thanks for looking this over. I've updated the formatting, and think it's ready to check ...
10 years, 1 month ago (2010-11-01 20:22:29 UTC) #9
tfarina
Some more nit below. http://codereview.chromium.org/4098003/diff/40001/41003 File chrome/browser/chromeos/system_key_event_listener.cc (right): http://codereview.chromium.org/4098003/diff/40001/41003#newcode7 chrome/browser/chromeos/system_key_event_listener.cc:7: #include <X11/XF86keysym.h> nit: sort alphabetical. ...
10 years, 1 month ago (2010-11-01 20:29:21 UTC) #10
davejcool
Here's more nit fixes and responses, thanks again. -David. http://codereview.chromium.org/4098003/diff/40001/41003 File chrome/browser/chromeos/system_key_event_listener.cc (right): http://codereview.chromium.org/4098003/diff/40001/41003#newcode23 chrome/browser/chromeos/system_key_event_listener.cc:23: ...
10 years, 1 month ago (2010-11-01 21:46:21 UTC) #11
tfarina
My nits LGTM. http://codereview.chromium.org/4098003/diff/40001/41003 File chrome/browser/chromeos/system_key_event_listener.cc (right): http://codereview.chromium.org/4098003/diff/40001/41003#newcode23 chrome/browser/chromeos/system_key_event_listener.cc:23: static SystemKeyEventListener* instance = NULL; On ...
10 years, 1 month ago (2010-11-01 22:55:21 UTC) #12
davejcool
10 years, 1 month ago (2010-11-02 00:50:30 UTC) #13
OK, I'm leaving ::instance() as it was after all.  So I'll check this in soon.

http://codereview.chromium.org/4098003/diff/40001/41003
File chrome/browser/chromeos/system_key_event_listener.cc (right):

http://codereview.chromium.org/4098003/diff/40001/41003#newcode23
chrome/browser/chromeos/system_key_event_listener.cc:23: static
SystemKeyEventListener* instance = NULL;
Greg said he didn't really need to do it in his case either, so I'm backing out
and leaving this as it was before.

Powered by Google App Engine
This is Rietveld 408576698