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

Unified Diff: backlight.h

Issue 6715014: Display off is done by a callback into backlight controller (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/power_manager.git
Patch Set: Deleted unused lines, 2010->2011 Created 9 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
« no previous file with comments | « no previous file | backlight.cc » ('j') | mock_backlight.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: backlight.h
diff --git a/backlight.h b/backlight.h
index eda46f479b40af2a93720de6b771780027823e1d..4b18e678601a983bc617120211c020e468c4cebf 100644
--- a/backlight.h
+++ b/backlight.h
@@ -28,7 +28,7 @@ namespace power_manager {
class Backlight : public BacklightInterface {
public:
- Backlight() {}
+ Backlight();
virtual ~Backlight() {}
// Initialize the backlight object.
@@ -40,6 +40,7 @@ class Backlight : public BacklightInterface {
virtual bool GetBrightness(int64* level, int64* max);
virtual bool GetTargetBrightness(int64* level);
virtual bool SetBrightness(int64 level);
+ virtual void SetScreenOffFunc(SIGNAL_CALLBACK_PTR(void, func), void *data);
// Returns info about the gradual brightness transition, represented as the
// number of steps and the interval of each step in milliseconds.
@@ -76,6 +77,10 @@ class Backlight : public BacklightInterface {
int64 target_brightness_; // The current intended brightness level.
+ // Callback function and data to determine whether to turn screen off.
+ void *turn_screen_off_data_;
+ SIGNAL_CALLBACK_PTR(void, turn_screen_off_func_);
+
DISALLOW_COPY_AND_ASSIGN(Backlight);
};
« no previous file with comments | « no previous file | backlight.cc » ('j') | mock_backlight.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698