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

Unified Diff: load.cc

Issue 5640003: libcros: Watch for display brightness changes. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/cros.git@master
Patch Set: update comment Created 10 years 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 | « chromeos_cros_api.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: load.cc
diff --git a/load.cc b/load.cc
index 0c824c0afdef2683e435840dd87b9de15836e94f..6c13a11fc82e9c6585b07e505270032094be6a67 100644
--- a/load.cc
+++ b/load.cc
@@ -9,6 +9,7 @@
#include <base/basictypes.h>
+#include "chromeos_brightness.h" // NOLINT
#include "chromeos_cros_api.h" // NOLINT
#include "chromeos_cryptohome.h" // NOLINT
#include "chromeos_imageburn.h" //NOLINT
@@ -318,6 +319,13 @@ DECL_FUNC_1(SetTimezoneID, void, const std::string& id);
DECL_FUNC_0(GetMachineInfo, MachineInfo*);
DECL_FUNC_1(FreeMachineInfo, void, MachineInfo*);
+// Brightness
+DECL_FUNC_2(MonitorBrightness,
+ BrightnessConnection,
+ BrightnessMonitorFunction,
+ void*);
+DECL_FUNC_1(DisconnectBrightness, void, BrightnessConnection);
+
char const * const kCrosDefaultPath = "/opt/google/chrome/chromeos/libcros.so";
@@ -568,6 +576,10 @@ bool LoadLibcros(const char* path_to_libcros, std::string& error_string) {
INIT_FUNC(GetMachineInfo);
INIT_FUNC(FreeMachineInfo);
+ // Brightness
+ INIT_FUNC(MonitorBrightness);
+ INIT_FUNC(DisconnectBrightness);
+
return error_string.empty();
}
« no previous file with comments | « chromeos_cros_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698