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

Side by Side Diff: ash/system/chromeos/keyboard_brightness_controller.cc

Issue 2099443002: Migrate simple ash Shell metrics users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win compile error. Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/system/chromeos/keyboard_brightness_controller.h" 5 #include "ash/system/chromeos/keyboard_brightness_controller.h"
6 6
7 #include "ash/metrics/user_metrics_recorder.h" 7 #include "ash/common/wm_shell.h"
8 #include "ash/shell.h"
9 #include "chromeos/dbus/dbus_thread_manager.h" 8 #include "chromeos/dbus/dbus_thread_manager.h"
10 #include "chromeos/dbus/power_manager_client.h" 9 #include "chromeos/dbus/power_manager_client.h"
11 #include "ui/base/accelerators/accelerator.h" 10 #include "ui/base/accelerators/accelerator.h"
12 11
13 namespace ash { 12 namespace ash {
14 13
15 void KeyboardBrightnessController::HandleKeyboardBrightnessDown( 14 void KeyboardBrightnessController::HandleKeyboardBrightnessDown(
16 const ui::Accelerator& accelerator) { 15 const ui::Accelerator& accelerator) {
17 if (accelerator.key_code() == ui::VKEY_BRIGHTNESS_DOWN) { 16 if (accelerator.key_code() == ui::VKEY_BRIGHTNESS_DOWN) {
18 Shell::GetInstance()->metrics()->RecordUserMetricsAction( 17 WmShell::Get()->RecordUserMetricsAction(
19 UMA_ACCEL_KEYBOARD_BRIGHTNESS_DOWN_F6); 18 UMA_ACCEL_KEYBOARD_BRIGHTNESS_DOWN_F6);
20 } 19 }
21 20
22 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> 21 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
23 DecreaseKeyboardBrightness(); 22 DecreaseKeyboardBrightness();
24 } 23 }
25 24
26 void KeyboardBrightnessController::HandleKeyboardBrightnessUp( 25 void KeyboardBrightnessController::HandleKeyboardBrightnessUp(
27 const ui::Accelerator& accelerator) { 26 const ui::Accelerator& accelerator) {
28 if (accelerator.key_code() == ui::VKEY_BRIGHTNESS_UP) { 27 if (accelerator.key_code() == ui::VKEY_BRIGHTNESS_UP) {
29 Shell::GetInstance()->metrics()->RecordUserMetricsAction( 28 WmShell::Get()->RecordUserMetricsAction(
30 UMA_ACCEL_KEYBOARD_BRIGHTNESS_UP_F7); 29 UMA_ACCEL_KEYBOARD_BRIGHTNESS_UP_F7);
31 } 30 }
32 31
33 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> 32 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
34 IncreaseKeyboardBrightness(); 33 IncreaseKeyboardBrightness();
35 } 34 }
36 35
37 } // namespace ash 36 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/chromeos/brightness/tray_brightness.cc ('k') | ash/system/chromeos/network/network_state_list_detailed_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698