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

Unified Diff: chrome/browser/ui/views/ash/volume_controller_chromeos.cc

Issue 10383108: Adding four bezel gestures (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixing build breakage Created 8 years, 7 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/ui/views/ash/volume_controller_chromeos.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/ash/volume_controller_chromeos.cc
diff --git a/chrome/browser/ui/views/ash/volume_controller_chromeos.cc b/chrome/browser/ui/views/ash/volume_controller_chromeos.cc
index 1db47d8ca262c64319db171515b8a1a0d6e7b241..d789dd07ec20407c6fd73b3417e36022698bc65b 100644
--- a/chrome/browser/ui/views/ash/volume_controller_chromeos.cc
+++ b/chrome/browser/ui/views/ash/volume_controller_chromeos.cc
@@ -68,3 +68,13 @@ bool VolumeController::HandleVolumeUp(const ui::Accelerator& accelerator) {
audio_handler->IsMuted());
return true;
}
+
+void VolumeController::SetVolumePercent(double percent) {
+ chromeos::AudioHandler* audio_handler = chromeos::AudioHandler::GetInstance();
+ if (audio_handler->IsMuted()) {
+ audio_handler->SetMuted(false);
+ }
+ audio_handler->SetVolumePercent(percent);
+ extensions::DispatchVolumeChangedEvent(audio_handler->GetVolumePercent(),
+ audio_handler->IsMuted());
+}
« no previous file with comments | « chrome/browser/ui/views/ash/volume_controller_chromeos.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698