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

Unified Diff: ash/wm/system_gesture_event_filter.cc

Issue 10825264: Consolidate volume control code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + Fix virutal function name. Created 8 years, 4 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 | « ash/volume_control_delegate.h ('k') | ash/wm/system_gesture_event_filter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/system_gesture_event_filter.cc
diff --git a/ash/wm/system_gesture_event_filter.cc b/ash/wm/system_gesture_event_filter.cc
index 3d79937af0017d2f7ade649a82284023ed5e6a1b..36be556d4c5624f164ad65f9795bc198a6d90b96 100644
--- a/ash/wm/system_gesture_event_filter.cc
+++ b/ash/wm/system_gesture_event_filter.cc
@@ -13,6 +13,7 @@
#include "ash/shell_delegate.h"
#include "ash/shell_window_ids.h"
#include "ash/system/brightness/brightness_control_delegate.h"
+#include "ash/system/tray/system_tray_delegate.h"
#include "ash/volume_control_delegate.h"
#include "ash/wm/property_util.h"
#include "ash/wm/window_animations.h"
@@ -692,10 +693,8 @@ bool SystemGestureEventFilter::HandleDeviceControl(
if (delegate)
delegate->SetBrightnessPercent(100.0 - percent, true);
} else if (start_location_ == BEZEL_START_RIGHT) {
- ash::VolumeControlDelegate* delegate =
- accelerator->volume_control_delegate();
- if (delegate)
- delegate->SetVolumePercent(100.0 - percent);
+ Shell::GetInstance()->tray_delegate()->GetVolumeControlDelegate()->
+ SetVolumePercent(100.0 - percent);
} else {
return true;
}
« no previous file with comments | « ash/volume_control_delegate.h ('k') | ash/wm/system_gesture_event_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698