Disable accessible touch exploration by default.
[chromium-blink-merge.git] / ash / system / chromeos / keyboard_brightness_controller.cc
blob7d7efe6ceae9027c70e777f1baea9e525ba092a2
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ash/system/chromeos/keyboard_brightness_controller.h"
7 #include "ash/metrics/user_metrics_recorder.h"
8 #include "ash/shell.h"
9 #include "chromeos/dbus/dbus_thread_manager.h"
10 #include "chromeos/dbus/power_manager_client.h"
11 #include "ui/base/accelerators/accelerator.h"
13 namespace ash {
15 bool KeyboardBrightnessController::HandleKeyboardBrightnessDown(
16 const ui::Accelerator& accelerator) {
17 if (accelerator.key_code() == ui::VKEY_BRIGHTNESS_DOWN) {
18 Shell::GetInstance()->metrics()->RecordUserMetricsAction(
19 UMA_ACCEL_KEYBOARD_BRIGHTNESS_DOWN_F6);
22 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
23 DecreaseKeyboardBrightness();
24 return true;
27 bool KeyboardBrightnessController::HandleKeyboardBrightnessUp(
28 const ui::Accelerator& accelerator) {
29 if (accelerator.key_code() == ui::VKEY_BRIGHTNESS_UP) {
30 Shell::GetInstance()->metrics()->RecordUserMetricsAction(
31 UMA_ACCEL_KEYBOARD_BRIGHTNESS_UP_F7);
34 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
35 IncreaseKeyboardBrightness();
36 return true;
39 } // namespace ash