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

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: 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
« ash/wm/user_activity_detector.h ('K') | « 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 6a5755205b49c3ca6053b74e617f1007ea1aa56a..a8415415baa80dc34bf11317ec46fac5d49aa26a 100644
--- a/chromeos/dbus/power_manager_client.cc
+++ b/chromeos/dbus/power_manager_client.cc
@@ -239,6 +239,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(
@@ -653,6 +666,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(
« ash/wm/user_activity_detector.h ('K') | « chromeos/dbus/power_manager_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698