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

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 10694118: Add shortcuts for keyboard brightness (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fix Created 8 years, 5 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 68f2b2fe92d83ef7465af6eee91dfa651efce3a0..05a63a65cd358a0447de90a71a8e720e7e5dba71 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -25,6 +25,7 @@
#include "ash/shell_delegate.h"
#include "ash/shell_window_ids.h"
#include "ash/system/brightness/brightness_control_delegate.h"
+#include "ash/system/keyboard_brightness/keyboard_brightness_control_delegate.h"
#include "ash/system/tray/system_tray.h"
#include "ash/volume_control_delegate.h"
#include "ash/wm/property_util.h"
@@ -445,6 +446,16 @@ bool AcceleratorController::PerformAction(int action,
if (brightness_control_delegate_.get())
return brightness_control_delegate_->HandleBrightnessUp(accelerator);
break;
+ case KEYBOARD_BRIGHTNESS_DOWN:
+ if (keyboard_brightness_control_delegate_.get())
+ return keyboard_brightness_control_delegate_->
+ HandleKeyboardBrightnessDown(accelerator);
+ break;
+ case KEYBOARD_BRIGHTNESS_UP:
+ if (keyboard_brightness_control_delegate_.get())
+ return keyboard_brightness_control_delegate_->
+ HandleKeyboardBrightnessUp(accelerator);
+ break;
case VOLUME_MUTE:
if (volume_control_delegate_.get())
return volume_control_delegate_->HandleVolumeMute(accelerator);
@@ -629,6 +640,13 @@ void AcceleratorController::SetImeControlDelegate(
ime_control_delegate_.swap(ime_control_delegate);
}
+void AcceleratorController::SetKeyboardBrightnessControlDelegate(
+ scoped_ptr<KeyboardBrightnessControlDelegate>
+ keyboard_brightness_control_delegate) {
+ keyboard_brightness_control_delegate_.swap(
+ keyboard_brightness_control_delegate);
+}
+
void AcceleratorController::SetScreenshotDelegate(
scoped_ptr<ScreenshotDelegate> screenshot_delegate) {
screenshot_delegate_.swap(screenshot_delegate);
« 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