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

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

Issue 2319783002: mash: Allow a subset of D-Bus clients to be created in DBusThreadManager (Closed)
Patch Set: WIP, add DBusThreadManagerAsh and DBusThreadManagerChrome Created 4 years, 3 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
Index: ash/common/system/chromeos/brightness/brightness_controller_chromeos.cc
diff --git a/ash/common/system/chromeos/brightness/brightness_controller_chromeos.cc b/ash/common/system/chromeos/brightness/brightness_controller_chromeos.cc
index 9ee4f779e1973f7c755062be20406472a7fe635a..46268d9a076ff118d805067c502bde66509e4a2a 100644
--- a/ash/common/system/chromeos/brightness/brightness_controller_chromeos.cc
+++ b/ash/common/system/chromeos/brightness/brightness_controller_chromeos.cc
@@ -4,8 +4,9 @@
#include "ash/common/system/chromeos/brightness/brightness_controller_chromeos.h"
+#include "ash/common/dbus_thread_manager_ash.h"
#include "base/metrics/user_metrics.h"
-#include "chromeos/dbus/dbus_thread_manager.h"
+// #include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/power_manager_client.h"
#include "ui/base/accelerators/accelerator.h"
@@ -17,7 +18,7 @@ void BrightnessControllerChromeos::HandleBrightnessDown(
if (accelerator.key_code() == ui::VKEY_BRIGHTNESS_DOWN)
base::RecordAction(base::UserMetricsAction("Accel_BrightnessDown_F6"));
- chromeos::DBusThreadManager::Get()
+ DBusThreadManagerAsh::Get()
->GetPowerManagerClient()
->DecreaseScreenBrightness(true);
}
@@ -27,21 +28,21 @@ void BrightnessControllerChromeos::HandleBrightnessUp(
if (accelerator.key_code() == ui::VKEY_BRIGHTNESS_UP)
base::RecordAction(base::UserMetricsAction("Accel_BrightnessUp_F7"));
- chromeos::DBusThreadManager::Get()
+ DBusThreadManagerAsh::Get()
->GetPowerManagerClient()
->IncreaseScreenBrightness();
}
void BrightnessControllerChromeos::SetBrightnessPercent(double percent,
bool gradual) {
- chromeos::DBusThreadManager::Get()
+ DBusThreadManagerAsh::Get()
->GetPowerManagerClient()
->SetScreenBrightnessPercent(percent, gradual);
}
void BrightnessControllerChromeos::GetBrightnessPercent(
const base::Callback<void(double)>& callback) {
- chromeos::DBusThreadManager::Get()
+ DBusThreadManagerAsh::Get()
->GetPowerManagerClient()
->GetScreenBrightnessPercent(callback);
}
« no previous file with comments | « ash/common/system/chromeos/audio/tray_audio_chromeos.cc ('k') | ash/common/system/chromeos/brightness/tray_brightness.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698