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

Unified Diff: ash/system/brightness/brightness_controller_chromeos.cc

Issue 2731873002: Revert "chromeos: Move files in //ash/common to //ash, part 1" (Closed)
Patch Set: Created 3 years, 9 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/system/brightness/brightness_controller_chromeos.h ('k') | ash/system/brightness/tray_brightness.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/brightness/brightness_controller_chromeos.cc
diff --git a/ash/system/brightness/brightness_controller_chromeos.cc b/ash/system/brightness/brightness_controller_chromeos.cc
deleted file mode 100644
index 9e3a47340f54b320d09066ff1f87630d188337b8..0000000000000000000000000000000000000000
--- a/ash/system/brightness/brightness_controller_chromeos.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/brightness/brightness_controller_chromeos.h"
-
-#include "base/metrics/user_metrics.h"
-#include "chromeos/dbus/dbus_thread_manager.h"
-#include "chromeos/dbus/power_manager_client.h"
-#include "ui/base/accelerators/accelerator.h"
-
-namespace ash {
-namespace system {
-
-void BrightnessControllerChromeos::HandleBrightnessDown(
- const ui::Accelerator& accelerator) {
- if (accelerator.key_code() == ui::VKEY_BRIGHTNESS_DOWN)
- base::RecordAction(base::UserMetricsAction("Accel_BrightnessDown_F6"));
-
- chromeos::DBusThreadManager::Get()
- ->GetPowerManagerClient()
- ->DecreaseScreenBrightness(true);
-}
-
-void BrightnessControllerChromeos::HandleBrightnessUp(
- const ui::Accelerator& accelerator) {
- if (accelerator.key_code() == ui::VKEY_BRIGHTNESS_UP)
- base::RecordAction(base::UserMetricsAction("Accel_BrightnessUp_F7"));
-
- chromeos::DBusThreadManager::Get()
- ->GetPowerManagerClient()
- ->IncreaseScreenBrightness();
-}
-
-void BrightnessControllerChromeos::SetBrightnessPercent(double percent,
- bool gradual) {
- chromeos::DBusThreadManager::Get()
- ->GetPowerManagerClient()
- ->SetScreenBrightnessPercent(percent, gradual);
-}
-
-void BrightnessControllerChromeos::GetBrightnessPercent(
- const base::Callback<void(double)>& callback) {
- chromeos::DBusThreadManager::Get()
- ->GetPowerManagerClient()
- ->GetScreenBrightnessPercent(callback);
-}
-
-} // namespace system
-} // namespace ash
« no previous file with comments | « ash/system/brightness/brightness_controller_chromeos.h ('k') | ash/system/brightness/tray_brightness.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698