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

Unified Diff: chrome/browser/chromeos/power/screen_dimming_observer.h

Issue 10263011: chromeos: Add support for dimming the screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 8 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
Index: chrome/browser/chromeos/power/screen_dimming_observer.h
diff --git a/chrome/browser/chromeos/power/screen_dimming_observer.h b/chrome/browser/chromeos/power/screen_dimming_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..6f6342f98f318e95de7f97c2437a0666bda402cb
--- /dev/null
+++ b/chrome/browser/chromeos/power/screen_dimming_observer.h
@@ -0,0 +1,32 @@
+// 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.
+
+#ifndef CHROME_BROWSER_CHROMEOS_POWER_SCREEN_DIMMING_OBSERVER_H_
+#define CHROME_BROWSER_CHROMEOS_POWER_SCREEN_DIMMING_OBSERVER_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "chromeos/dbus/power_manager_client.h"
+
+namespace chromeos {
+
+// Listens for requests to enable or disable dimming of the screen in software
+// (as opposed to by adjusting a backlight).
+class ScreenDimmingObserver : public PowerManagerClient::Observer {
+ public:
+ // This class registers/unregisters itself as an observer in ctor/dtor.
+ ScreenDimmingObserver();
+ virtual ~ScreenDimmingObserver();
+
+ private:
+ // PowerManagerClient::Observer implementation.
+ virtual void ScreenDimmingRequested(ScreenDimmingState state) OVERRIDE;
+
+ DISALLOW_COPY_AND_ASSIGN(ScreenDimmingObserver);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_POWER_SCREEN_DIMMING_OBSERVER_H_
« no previous file with comments | « chrome/browser/chromeos/chrome_browser_main_chromeos.cc ('k') | chrome/browser/chromeos/power/screen_dimming_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698