summaryrefslogtreecommitdiffstats
path: root/ash/system
diff options
context:
space:
mode:
authorderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-07 05:24:07 +0000
committerderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-07 05:24:07 +0000
commit8405db533878bac39d622c421e8c1baa9d21c0fe (patch)
tree2c60a7f67b3a5d20c358e6f10c57a66e574e8bbc /ash/system
parentdce8642ab3068e41c3ce0a46571498dbd270921d (diff)
downloadchromium_src-8405db533878bac39d622c421e8c1baa9d21c0fe.zip
chromium_src-8405db533878bac39d622c421e8c1baa9d21c0fe.tar.gz
chromium_src-8405db533878bac39d622c421e8c1baa9d21c0fe.tar.bz2
chromeos: Add DisplayPowerServiceProvider.
This makes Chrome export a SetDisplayPower D-Bus method call for the power manager. It also reworks OutputConfigurator to cache the most-recently-requested power state and use it for future display mode requests. Finally, it works around a related bug where multiple mouse events may be generated when the displays are reconfigured, which would result in a report of user activity that could abort suspending. BUG=chromium-os:39289,180348,chrome-os-partner:12662 TBR=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/12391004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186625 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/system')
-rw-r--r--ash/system/chromeos/tray_display.cc2
-rw-r--r--ash/system/chromeos/tray_display.h6
2 files changed, 8 insertions, 0 deletions
diff --git a/ash/system/chromeos/tray_display.cc b/ash/system/chromeos/tray_display.cc
index 19ca0fc..a7f73c1 100644
--- a/ash/system/chromeos/tray_display.cc
+++ b/ash/system/chromeos/tray_display.cc
@@ -183,10 +183,12 @@ void TrayDisplay::OnDisplayRemoved(const gfx::Display& old_display) {
default_->Update();
}
+#if defined(OS_CHROMEOS)
void TrayDisplay::OnDisplayModeChanged() {
if (default_)
default_->Update();
}
+#endif
} // namespace internal
} // namespace ash
diff --git a/ash/system/chromeos/tray_display.h b/ash/system/chromeos/tray_display.h
index d471df8..524ffe8 100644
--- a/ash/system/chromeos/tray_display.h
+++ b/ash/system/chromeos/tray_display.h
@@ -9,7 +9,9 @@
#include "base/memory/scoped_ptr.h"
#include "ui/gfx/display_observer.h"
+#if defined(OS_CHROMEOS)
#include "chromeos/display/output_configurator.h"
+#endif
namespace views {
class View;
@@ -20,7 +22,9 @@ namespace internal {
class DisplayView;
class TrayDisplay : public SystemTrayItem,
+#if defined(OS_CHROMEOS)
public chromeos::OutputConfigurator::Observer,
+#endif
public gfx::DisplayObserver {
public:
explicit TrayDisplay(SystemTray* system_tray);
@@ -36,8 +40,10 @@ class TrayDisplay : public SystemTrayItem,
virtual void OnDisplayAdded(const gfx::Display& new_display) OVERRIDE;
virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE;
+#if defined(OS_CHROMEOS)
// Overridden from chromeos::OutputConfigurator::Observer
virtual void OnDisplayModeChanged() OVERRIDE;
+#endif
DisplayView* default_;