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

Unified Diff: chromeos/dbus/power_manager_client.cc

Issue 10544011: chromeos: Notify power manager about user activity. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: RootWindowEventFilter -> EnvEventFilter Created 8 years, 6 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 | « chromeos/dbus/power_manager_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/power_manager_client.cc
diff --git a/chromeos/dbus/power_manager_client.cc b/chromeos/dbus/power_manager_client.cc
index e3090de306aceb65ea299af6fb94774d21ef099f..5c712fdb119721c1881be4bb1fc363a880344af8 100644
--- a/chromeos/dbus/power_manager_client.cc
+++ b/chromeos/dbus/power_manager_client.cc
@@ -255,6 +255,19 @@ class PowerManagerClientImpl : public PowerManagerClient {
RequestIdleNotification(0);
}
+ virtual void NotifyUserActivity(
+ const base::TimeTicks& last_activity_time) OVERRIDE {
+ dbus::MethodCall method_call(
+ power_manager::kPowerManagerInterface,
+ power_manager::kHandleUserActivityMethod);
+ dbus::MessageWriter writer(&method_call);
+ writer.AppendInt64(last_activity_time.ToInternalValue());
+ power_manager_proxy_->CallMethod(
+ &method_call,
+ dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
+ dbus::ObjectProxy::EmptyResponseCallback());
+ }
+
virtual void NotifyVideoActivity(
const base::TimeTicks& last_activity_time) OVERRIDE {
dbus::MethodCall method_call(
@@ -714,6 +727,8 @@ class PowerManagerClientStubImpl : public PowerManagerClient {
virtual void RequestIdleNotification(int64 threshold) OVERRIDE {}
virtual void RequestActiveNotification() OVERRIDE {}
+ virtual void NotifyUserActivity(
+ const base::TimeTicks& last_activity_time) OVERRIDE {}
virtual void NotifyVideoActivity(
const base::TimeTicks& last_activity_time) OVERRIDE {}
virtual void RequestPowerStateOverrides(
« no previous file with comments | « chromeos/dbus/power_manager_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698