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

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

Issue 2790012: Volume bubble added for ChromeOS. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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 | « no previous file | chrome/browser/chromeos/volume_bubble.h » ('j') | chrome/browser/chromeos/volume_bubble.cc » ('J')
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 49925)
+++ chrome/browser/chromeos/system_key_event_listener.cc (working copy)
@@ -5,6 +5,7 @@
#include "chrome/browser/chromeos/system_key_event_listener.h"
#include "chrome/browser/chromeos/audio_handler.h"
+#include "chrome/browser/chromeos/volume_bubble.h"
#include "third_party/cros/chromeos_wm_ipc_enums.h"
namespace chromeos {
@@ -17,8 +18,7 @@
// static
SystemKeyEventListener* SystemKeyEventListener::instance() {
- SystemKeyEventListener* instance = Singleton<SystemKeyEventListener>::get();
- return instance;
+ return Singleton<SystemKeyEventListener>::get();
}
SystemKeyEventListener::SystemKeyEventListener()
@@ -44,14 +44,19 @@
// long as mute key was held.
// Refer to http://crosbug.com/3754 and http://crosbug.com/3751
audio_handler_->SetMute(true);
+ VolumeBubble::instance()->ShowVolumeBubble(0);
break;
case WM_IPC_SYSTEM_KEY_VOLUME_DOWN:
audio_handler_->AdjustVolumeByPercent(-kStepPercentage);
audio_handler_->SetMute(false);
+ VolumeBubble::instance()->ShowVolumeBubble(
+ audio_handler_->GetVolumePercent());
break;
case WM_IPC_SYSTEM_KEY_VOLUME_UP:
audio_handler_->AdjustVolumeByPercent(kStepPercentage);
audio_handler_->SetMute(false);
+ VolumeBubble::instance()->ShowVolumeBubble(
+ audio_handler_->GetVolumePercent());
break;
default:
DLOG(ERROR) << "SystemKeyEventListener: Unexpected message "
@@ -61,4 +66,3 @@
}
} // namespace chromeos
-
« no previous file with comments | « no previous file | chrome/browser/chromeos/volume_bubble.h » ('j') | chrome/browser/chromeos/volume_bubble.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698