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

Unified Diff: chrome/browser/chromeos/system_key_event_listener.cc

Issue 9169033: Support for showing/hiding status area volume controls in desktop devices (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/system_key_event_listener.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/system_key_event_listener.cc
===================================================================
--- chrome/browser/chromeos/system_key_event_listener.cc (revision 119932)
+++ chrome/browser/chromeos/system_key_event_listener.cc (working copy)
@@ -152,13 +152,6 @@
stopped_ = true;
}
-AudioHandler* SystemKeyEventListener::GetAudioHandler() const {
- AudioHandler* audio_handler = AudioHandler::GetInstance();
- if (!audio_handler || !audio_handler->IsInitialized())
- return NULL;
- return audio_handler;
-}
-
void SystemKeyEventListener::AddCapsLockObserver(CapsLockObserver* observer) {
caps_lock_observers_.AddObserver(observer);
}
@@ -213,7 +206,7 @@
}
void SystemKeyEventListener::OnVolumeMute() {
- AudioHandler* audio_handler = GetAudioHandler();
+ AudioHandler* audio_handler = AudioHandler::GetInstanceIfInitialized();
if (!audio_handler)
return;
@@ -227,7 +220,7 @@
}
void SystemKeyEventListener::OnVolumeDown() {
- AudioHandler* audio_handler = GetAudioHandler();
+ AudioHandler* audio_handler = AudioHandler::GetInstanceIfInitialized();
if (!audio_handler)
return;
@@ -242,7 +235,7 @@
}
void SystemKeyEventListener::OnVolumeUp() {
- AudioHandler* audio_handler = GetAudioHandler();
+ AudioHandler* audio_handler = AudioHandler::GetInstanceIfInitialized();
if (!audio_handler)
return;
@@ -260,12 +253,13 @@
}
void SystemKeyEventListener::OnCapsLock(bool enabled) {
- FOR_EACH_OBSERVER(
- CapsLockObserver, caps_lock_observers_, OnCapsLockChange(enabled));
+ FOR_EACH_OBSERVER(CapsLockObserver,
+ caps_lock_observers_,
+ OnCapsLockChange(enabled));
}
void SystemKeyEventListener::ShowVolumeBubble() {
- AudioHandler* audio_handler = GetAudioHandler();
+ AudioHandler* audio_handler = AudioHandler::GetInstanceIfInitialized();
if (audio_handler) {
VolumeBubble::GetInstance()->ShowBubble(
audio_handler->GetVolumePercent(),
« no previous file with comments | « chrome/browser/chromeos/system_key_event_listener.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698