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

Issue 9169033: Support for showing/hiding status area volume controls in desktop devices (Closed)

Created:
8 years, 11 months ago by achuithb
Modified:
8 years, 10 months ago
CC:
chromium-reviews, sadrul, nkostylev+watch_chromium.org, derat+watch_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org, yusukes+watch_chromium.org
Visibility:
Public.

Description

Support for showing/hiding status area volume controls in desktop devices. * Show status area volume control when the command line has --show-volume-status * Create AudioHandler::VolumeObserver class and helpers so VolumeMenuButton and VolumeControlView can observe volume changes from key presses. * Move GetAudioHandler() common code in VolumeMenuButton and SystemKeyEventListener that returns the AudioHandler singleton only if the mixer has finished initializing to AudioHandler::GetInitialized(). * Handle mute in VolumeMenuButton correctly. BUG=chromium-os:22080 TEST=Should see the volume control in the status area on builds with USE flag is_desktop set. The volume control icon and menu should be in sync with volume key button controls. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=119948

Patch Set 1 #

Patch Set 2 : lint errors #

Total comments: 9

Patch Set 3 : Xiyuan review feedback #

Patch Set 4 : rebase #

Patch Set 5 : Add AudioHandler::VolumeObserver #

Patch Set 6 : compile errors #

Patch Set 7 : move AddVolumeObserver/RemoveVolumeObserver to VolumeObserver #

Patch Set 8 : Get rid of SystemKeyEventListener::StatusAreaVolumeObserver #

Patch Set 9 : minor fixes #

Total comments: 24

Patch Set 10 : Dan and Xiyuan review feedback #

Patch Set 11 : minor #

Total comments: 2

Patch Set 12 : move IsMixerInitialized #

Total comments: 13

Patch Set 13 : stevenjb feedback #

Patch Set 14 : minor #

Total comments: 4

Patch Set 15 : derat nits #

Patch Set 16 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -42 lines) Patch
M chrome/browser/chromeos/audio/audio_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +22 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/audio/audio_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +18 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/status/volume_menu_button.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/chromeos/status/volume_menu_button.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 9 chunks +53 lines, -22 lines 0 comments Download
M chrome/browser/chromeos/system_key_event_listener.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/system_key_event_listener.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +7 lines, -13 lines 0 comments Download
M chrome/common/chrome_switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 29 (0 generated)
achuithb
This CL is dependent on https://gerrit.chromium.org/gerrit/#change,14745 which sets the --show-volume-status command line on desktop devices. ...
8 years, 11 months ago (2012-01-25 00:34:59 UTC) #1
xiyuan
http://codereview.chromium.org/9169033/diff/4002/chrome/browser/chromeos/system_key_event_listener.cc File chrome/browser/chromeos/system_key_event_listener.cc (right): http://codereview.chromium.org/9169033/diff/4002/chrome/browser/chromeos/system_key_event_listener.cc#newcode179 chrome/browser/chromeos/system_key_event_listener.cc:179: ShowStatusAreaVolume(show_status_area_volume_); I don't think this should be here. Could ...
8 years, 11 months ago (2012-01-25 04:43:12 UTC) #2
achuithb
Thanks for the feedback. PTAL. http://codereview.chromium.org/9169033/diff/4002/chrome/browser/chromeos/system_key_event_listener.cc File chrome/browser/chromeos/system_key_event_listener.cc (right): http://codereview.chromium.org/9169033/diff/4002/chrome/browser/chromeos/system_key_event_listener.cc#newcode179 chrome/browser/chromeos/system_key_event_listener.cc:179: ShowStatusAreaVolume(show_status_area_volume_); On 2012/01/25 04:43:12, ...
8 years, 11 months ago (2012-01-25 10:46:05 UTC) #3
achuithb
Looks like the rebase messed the diffs up, sorry :(
8 years, 11 months ago (2012-01-25 10:48:02 UTC) #4
Daniel Erat
http://codereview.chromium.org/9169033/diff/4002/chrome/browser/chromeos/system_key_event_listener.cc File chrome/browser/chromeos/system_key_event_listener.cc (right): http://codereview.chromium.org/9169033/diff/4002/chrome/browser/chromeos/system_key_event_listener.cc#newcode233 chrome/browser/chromeos/system_key_event_listener.cc:233: return; On 2012/01/25 10:46:06, achuith.bhandarkar wrote: > On 2012/01/25 ...
8 years, 11 months ago (2012-01-25 15:58:50 UTC) #5
xiyuan
On 2012/01/25 15:58:50, Daniel Erat wrote: > http://codereview.chromium.org/9169033/diff/4002/chrome/browser/chromeos/system_key_event_listener.cc > File chrome/browser/chromeos/system_key_event_listener.cc (right): > > http://codereview.chromium.org/9169033/diff/4002/chrome/browser/chromeos/system_key_event_listener.cc#newcode233 ...
8 years, 11 months ago (2012-01-25 17:54:40 UTC) #6
achuithb
On 2012/01/25 17:54:40, xiyuan wrote: > On 2012/01/25 15:58:50, Daniel Erat wrote: > > > ...
8 years, 11 months ago (2012-01-25 19:50:09 UTC) #7
achuithb
I've reworked the patch. Daniel and Xiyuan, PTAL. Thanks!
8 years, 11 months ago (2012-01-26 11:52:10 UTC) #8
Daniel Erat
http://codereview.chromium.org/9169033/diff/5020/chrome/browser/chromeos/audio/audio_handler.cc File chrome/browser/chromeos/audio/audio_handler.cc (right): http://codereview.chromium.org/9169033/diff/5020/chrome/browser/chromeos/audio/audio_handler.cc#newcode69 chrome/browser/chromeos/audio/audio_handler.cc:69: VolumeChanged(); nit: unless you anticipate adding more code to ...
8 years, 11 months ago (2012-01-26 17:55:21 UTC) #9
xiyuan
http://codereview.chromium.org/9169033/diff/5020/chrome/browser/chromeos/audio/audio_handler.cc File chrome/browser/chromeos/audio/audio_handler.cc (right): http://codereview.chromium.org/9169033/diff/5020/chrome/browser/chromeos/audio/audio_handler.cc#newcode69 chrome/browser/chromeos/audio/audio_handler.cc:69: VolumeChanged(); nit: If you want to keep this function, ...
8 years, 11 months ago (2012-01-26 18:07:10 UTC) #10
achuithb
I'll fix the other issues you brought up, but please let me know your thoughts ...
8 years, 11 months ago (2012-01-26 23:19:33 UTC) #11
xiyuan
http://codereview.chromium.org/9169033/diff/5020/chrome/browser/chromeos/audio/audio_handler.h File chrome/browser/chromeos/audio/audio_handler.h (right): http://codereview.chromium.org/9169033/diff/5020/chrome/browser/chromeos/audio/audio_handler.h#newcode40 chrome/browser/chromeos/audio/audio_handler.h:40: static AudioHandler* GetInitialized(); On 2012/01/26 23:19:34, achuith.bhandarkar wrote: > ...
8 years, 11 months ago (2012-01-26 23:41:58 UTC) #12
Daniel Erat
http://codereview.chromium.org/9169033/diff/5020/chrome/browser/chromeos/audio/audio_handler.cc File chrome/browser/chromeos/audio/audio_handler.cc (right): http://codereview.chromium.org/9169033/diff/5020/chrome/browser/chromeos/audio/audio_handler.cc#newcode137 chrome/browser/chromeos/audio/audio_handler.cc:137: if (AudioHandler::GetInstance()) // Mixer may be uninitialized here. On ...
8 years, 11 months ago (2012-01-26 23:53:27 UTC) #13
achuithb
http://codereview.chromium.org/9169033/diff/5020/chrome/browser/chromeos/audio/audio_handler.cc File chrome/browser/chromeos/audio/audio_handler.cc (right): http://codereview.chromium.org/9169033/diff/5020/chrome/browser/chromeos/audio/audio_handler.cc#newcode137 chrome/browser/chromeos/audio/audio_handler.cc:137: if (AudioHandler::GetInstance()) // Mixer may be uninitialized here. On ...
8 years, 11 months ago (2012-01-27 00:16:54 UTC) #14
achuithb
Daniel, Xiyuan: Thanks for the feedback, PTAL! http://codereview.chromium.org/9169033/diff/5020/chrome/browser/chromeos/audio/audio_handler.cc File chrome/browser/chromeos/audio/audio_handler.cc (right): http://codereview.chromium.org/9169033/diff/5020/chrome/browser/chromeos/audio/audio_handler.cc#newcode69 chrome/browser/chromeos/audio/audio_handler.cc:69: VolumeChanged(); On ...
8 years, 11 months ago (2012-01-27 01:48:05 UTC) #15
achuithb
Adding Steven for owners once-over for chromeos/status/* Dan: You should probably be owner for chromeos/audio/*, ...
8 years, 11 months ago (2012-01-27 01:51:05 UTC) #16
achuithb
On 2012/01/27 01:51:05, achuith.bhandarkar wrote: > Adding Steven for owners once-over for chromeos/status/* > > ...
8 years, 11 months ago (2012-01-27 01:55:53 UTC) #17
xiyuan
LGTM with one nit http://codereview.chromium.org/9169033/diff/10004/chrome/browser/chromeos/audio/audio_handler.cc File chrome/browser/chromeos/audio/audio_handler.cc (right): http://codereview.chromium.org/9169033/diff/10004/chrome/browser/chromeos/audio/audio_handler.cc#newcode53 chrome/browser/chromeos/audio/audio_handler.cc:53: bool AudioHandler::IsMixerInitialized() { nit: move ...
8 years, 11 months ago (2012-01-27 03:30:28 UTC) #18
achuithb
http://codereview.chromium.org/9169033/diff/10004/chrome/browser/chromeos/audio/audio_handler.cc File chrome/browser/chromeos/audio/audio_handler.cc (right): http://codereview.chromium.org/9169033/diff/10004/chrome/browser/chromeos/audio/audio_handler.cc#newcode53 chrome/browser/chromeos/audio/audio_handler.cc:53: bool AudioHandler::IsMixerInitialized() { On 2012/01/27 03:30:29, xiyuan wrote: > ...
8 years, 11 months ago (2012-01-27 10:12:46 UTC) #19
Daniel Erat
When the VolumeMenuButton is initialized before the mixer is initialized, how do you get the ...
8 years, 11 months ago (2012-01-27 18:03:57 UTC) #20
achuithb
On 2012/01/27 18:03:57, Daniel Erat wrote: > When the VolumeMenuButton is initialized before the mixer ...
8 years, 11 months ago (2012-01-27 18:53:27 UTC) #21
achuithb
http://codereview.chromium.org/9169033/diff/12004/chrome/browser/chromeos/audio/audio_handler.cc File chrome/browser/chromeos/audio/audio_handler.cc (right): http://codereview.chromium.org/9169033/diff/12004/chrome/browser/chromeos/audio/audio_handler.cc#newcode138 chrome/browser/chromeos/audio/audio_handler.cc:138: if (AudioHandler::GetInstance()) On 2012/01/27 18:03:57, Daniel Erat wrote: > ...
8 years, 11 months ago (2012-01-27 18:53:44 UTC) #22
stevenjb
http://codereview.chromium.org/9169033/diff/12004/chrome/browser/chromeos/audio/audio_handler.cc File chrome/browser/chromeos/audio/audio_handler.cc (right): http://codereview.chromium.org/9169033/diff/12004/chrome/browser/chromeos/audio/audio_handler.cc#newcode138 chrome/browser/chromeos/audio/audio_handler.cc:138: if (AudioHandler::GetInstance()) On 2012/01/27 18:53:44, achuith.bhandarkar wrote: > On ...
8 years, 11 months ago (2012-01-27 19:45:02 UTC) #23
Daniel Erat
http://codereview.chromium.org/9169033/diff/12004/chrome/browser/chromeos/audio/audio_handler.cc File chrome/browser/chromeos/audio/audio_handler.cc (right): http://codereview.chromium.org/9169033/diff/12004/chrome/browser/chromeos/audio/audio_handler.cc#newcode138 chrome/browser/chromeos/audio/audio_handler.cc:138: if (AudioHandler::GetInstance()) On 2012/01/27 19:45:02, stevenjb (chromium) wrote: > ...
8 years, 11 months ago (2012-01-27 23:06:54 UTC) #24
achuithb
Addressed review feedback. PTAL - Steven and Daniel. Sorry about the rebase. You can compare ...
8 years, 10 months ago (2012-01-31 00:58:43 UTC) #25
Daniel Erat
lgtm http://codereview.chromium.org/9169033/diff/21001/chrome/browser/chromeos/status/volume_menu_button.cc File chrome/browser/chromeos/status/volume_menu_button.cc (right): http://codereview.chromium.org/9169033/diff/21001/chrome/browser/chromeos/status/volume_menu_button.cc#newcode99 chrome/browser/chromeos/status/volume_menu_button.cc:99: nit: delete blank line http://codereview.chromium.org/9169033/diff/21001/chrome/browser/chromeos/status/volume_menu_button.cc#newcode112 chrome/browser/chromeos/status/volume_menu_button.cc:112: VolumeMenuButton* volume_menu_button_; ...
8 years, 10 months ago (2012-01-31 01:06:02 UTC) #26
achuithb
Thanks for the review, Dan! Waiting for owner lgtm from Steven... http://codereview.chromium.org/9169033/diff/21001/chrome/browser/chromeos/status/volume_menu_button.cc File chrome/browser/chromeos/status/volume_menu_button.cc (right): ...
8 years, 10 months ago (2012-01-31 10:47:31 UTC) #27
stevenjb
lgtm
8 years, 10 months ago (2012-01-31 17:56:36 UTC) #28
commit-bot: I haz the power
8 years, 10 months ago (2012-01-31 19:44:42 UTC) #29

Powered by Google App Engine
This is Rietveld 408576698