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

Unified Diff: chrome/browser/chromeos/power/output_observer.cc

Issue 12992004: chromeos: Remove dead power manager code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 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
Index: chrome/browser/chromeos/power/output_observer.cc
diff --git a/chrome/browser/chromeos/power/output_observer.cc b/chrome/browser/chromeos/power/output_observer.cc
deleted file mode 100644
index 0cbe05dd397876be354b567e5e7a00d9ae395883..0000000000000000000000000000000000000000
--- a/chrome/browser/chromeos/power/output_observer.cc
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2012 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 "chrome/browser/chromeos/power/output_observer.h"
-
-#include "ash/shell.h"
-#include "ash/wm/user_activity_detector.h"
-#include "chromeos/dbus/dbus_thread_manager.h"
-#include "chromeos/display/output_configurator.h"
-
-namespace chromeos {
-
-OutputObserver::OutputObserver() {
- DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver(this);
-}
-
-OutputObserver::~OutputObserver() {
- DBusThreadManager::Get()->GetPowerManagerClient()->RemoveObserver(this);
-}
-
-void OutputObserver::ScreenPowerSet(bool power_on, bool all_displays) {
- // Turning displays off when the device becomes idle or on just before we
- // suspend may trigger a mouse move, which would then be incorrectly
- // reported as user activity. Let the UserActivityDetector know so that
- // it can ignore such events.
- ash::Shell::GetInstance()->user_activity_detector()->OnDisplayPowerChanging();
-
- DisplayPowerState state = DISPLAY_POWER_ALL_ON;
- if (power_on && all_displays)
- state = DISPLAY_POWER_ALL_ON;
- else if (power_on && !all_displays)
- state = DISPLAY_POWER_INTERNAL_ON_EXTERNAL_OFF;
- else if (!power_on && all_displays)
- state = DISPLAY_POWER_ALL_OFF;
- else if (!power_on && !all_displays)
- state = DISPLAY_POWER_INTERNAL_OFF_EXTERNAL_ON;
-
- ash::Shell::GetInstance()->output_configurator()->SetDisplayPower(
- state, false);
-}
-
-} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/power/output_observer.h ('k') | chrome/browser/chromeos/power/user_activity_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698