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

Unified Diff: ash/accelerators/accelerator_controller.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/accelerators/accelerator_controller.h ('k') | ash/accelerators/accelerator_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller.cc
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index bae8d89024d6f62deb346813b0289a87883a284b..8cf78691f7095f327cf17a2470f0d9f83690aa30 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -499,16 +499,16 @@ bool AcceleratorController::PerformAction(int action,
HandleKeyboardBrightnessUp(accelerator);
break;
case VOLUME_MUTE:
- if (volume_control_delegate_.get())
- return volume_control_delegate_->HandleVolumeMute(accelerator);
+ return shell->tray_delegate()->GetVolumeControlDelegate()->
+ HandleVolumeMute(accelerator);
break;
case VOLUME_DOWN:
- if (volume_control_delegate_.get())
- return volume_control_delegate_->HandleVolumeDown(accelerator);
+ return shell->tray_delegate()->GetVolumeControlDelegate()->
+ HandleVolumeDown(accelerator);
break;
case VOLUME_UP:
- if (volume_control_delegate_.get())
- return volume_control_delegate_->HandleVolumeUp(accelerator);
+ return shell->tray_delegate()->GetVolumeControlDelegate()->
+ HandleVolumeUp(accelerator);
break;
case FOCUS_LAUNCHER:
if (shell->launcher())
@@ -699,11 +699,6 @@ void AcceleratorController::SetScreenshotDelegate(
screenshot_delegate_.swap(screenshot_delegate);
}
-void AcceleratorController::SetVolumeControlDelegate(
- scoped_ptr<VolumeControlDelegate> volume_control_delegate) {
- volume_control_delegate_.swap(volume_control_delegate);
-}
-
////////////////////////////////////////////////////////////////////////////////
// AcceleratorController, ui::AcceleratorTarget implementation:
« no previous file with comments | « ash/accelerators/accelerator_controller.h ('k') | ash/accelerators/accelerator_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698