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

Unified Diff: powerd.cc

Issue 6854002: Merge monitor_reconfigure into powerd. (Closed) Base URL: ssh://gitrw.chromium.org:9222/power_manager.git@master
Patch Set: . Created 9 years, 8 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 | « powerd.h ('k') | powerd_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: powerd.cc
diff --git a/powerd.cc b/powerd.cc
index 37456c184d2f2169f11d0fe89c53b0d92a363ce6..e674d47ca8393d83940bed1846f72365b8bed59e 100644
--- a/powerd.cc
+++ b/powerd.cc
@@ -22,6 +22,7 @@
#include "chromeos/dbus/service_constants.h"
#include "cros/chromeos_wm_ipc_enums.h"
#include "power_manager/metrics_constants.h"
+#include "power_manager/monitor_reconfigure.h"
#include "power_manager/power_button_handler.h"
#include "power_manager/power_constants.h"
#include "power_manager/util.h"
@@ -51,11 +52,13 @@ Daemon::Daemon(BacklightController* backlight_controller,
PowerPrefs* prefs,
MetricsLibraryInterface* metrics_lib,
VideoDetectorInterface* video_detector,
+ MonitorReconfigure* monitor_reconfigure,
const FilePath& run_dir)
: backlight_controller_(backlight_controller),
prefs_(prefs),
metrics_lib_(metrics_lib),
video_detector_(video_detector),
+ monitor_reconfigure_(monitor_reconfigure),
low_battery_suspend_percent_(0),
clean_shutdown_initiated_(false),
low_battery_(false),
@@ -704,7 +707,8 @@ void Daemon::SendBrightnessChangedSignal(bool user_initiated) {
void Daemon::HandleResume() {
file_tagger_.HandleResumeEvent();
- backlight_controller_->SetPowerState(BACKLIGHT_ACTIVE_ON);
+ // Monitor reconfigure will set the backlight if needed.
+ monitor_reconfigure_->Run();
}
} // namespace power_manager
« no previous file with comments | « powerd.h ('k') | powerd_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698