summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/brightness_observer.h
diff options
context:
space:
mode:
authorderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-10 19:50:37 +0000
committerderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-10 19:50:37 +0000
commit90fd2a462b83f34aec3b4c4a11a0ce812b4bf729 (patch)
treee0d3c1ec207aff3f485c43b0252d0a8c8ce60575 /chrome/browser/chromeos/brightness_observer.h
parentc64315f83800cc4eaaeb4e528cecfaad257f3da3 (diff)
downloadchromium_src-90fd2a462b83f34aec3b4c4a11a0ce812b4bf729.zip
chromium_src-90fd2a462b83f34aec3b4c4a11a0ce812b4bf729.tar.gz
chromium_src-90fd2a462b83f34aec3b4c4a11a0ce812b4bf729.tar.bz2
chromeos: Show onscreen bubble when brightness changes.
This adds a BrightnessLibrary class that registers to receive notification of brightness changes from the libcros code that I added in http://codereview.chromium.org/5640003/, a BrightnessBubble class to control an onscreen indicator of the current brightness level, and a BrightnessObserver class that wires up the two. This change depends on http://codereview.chromium.org/5603012/, which pulls the updated version of libcros into Chrome. BUG=chromium-os:8473,chromium-os:4816 TEST=built and tried it Review URL: http://codereview.chromium.org/5620004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68879 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/brightness_observer.h')
-rw-r--r--chrome/browser/chromeos/brightness_observer.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/chrome/browser/chromeos/brightness_observer.h b/chrome/browser/chromeos/brightness_observer.h
new file mode 100644
index 0000000..ce7bc95
--- /dev/null
+++ b/chrome/browser/chromeos/brightness_observer.h
@@ -0,0 +1,30 @@
+// Copyright (c) 2010 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_BRIGHTNESS_OBSERVER_H_
+#define CHROME_BROWSER_CHROMEOS_BRIGHTNESS_OBSERVER_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "chrome/browser/chromeos/cros/brightness_library.h"
+
+namespace chromeos {
+
+// This observer displays a bubble at the bottom of the screen showing the
+// current brightness level whenever the user changes it.
+class BrightnessObserver : public BrightnessLibrary::Observer {
+ public:
+ BrightnessObserver() {}
+ virtual ~BrightnessObserver() {}
+
+ private:
+ // BrightnessLibrary::Observer implementation.
+ virtual void BrightnessChanged(int level);
+
+ DISALLOW_COPY_AND_ASSIGN(BrightnessObserver);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_BRIGHTNESS_OBSERVER_H_