Index: chrome/browser/chromeos/dbus/power_manager_client.cc |
diff --git a/chrome/browser/chromeos/dbus/power_manager_client.cc b/chrome/browser/chromeos/dbus/power_manager_client.cc |
index d5f4f2e3a39c3420eaf66b0592786f69a590c264..dc9761d64cc6623ba667637f98eaf099ba5efada 100644 |
--- a/chrome/browser/chromeos/dbus/power_manager_client.cc |
+++ b/chrome/browser/chromeos/dbus/power_manager_client.cc |
@@ -133,6 +133,27 @@ class PowerManagerClientImpl : public PowerManagerClient { |
weak_ptr_factory_.GetWeakPtr())); |
} |
+ // Requests restart of the system. |
+ virtual void RequestRestart() OVERRIDE { |
+ dbus::MethodCall method_call(power_manager::kPowerManagerInterface, |
+ power_manager::kRequestRestartMethod); |
+ power_manager_proxy_->CallMethod( |
+ &method_call, |
+ dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, |
+ dbus::ObjectProxy::EmptyResponseCallback()); |
+ }; |
+ |
+ // Requests shutdown of the system. |
+ virtual void RequestShutdown() OVERRIDE { |
+ dbus::MethodCall method_call(power_manager::kPowerManagerInterface, |
+ power_manager::kRequestShutdownMethod); |
+ power_manager_proxy_->CallMethod( |
+ &method_call, |
+ dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, |
+ dbus::ObjectProxy::EmptyResponseCallback()); |
+ } |
+ |
+ |
private: |
// Called when a dbus signal is initially connected. |
void SignalConnected(const std::string& interface_name, |
@@ -263,6 +284,10 @@ class PowerManagerClientStubImpl : public PowerManagerClient { |
} |
} |
+ virtual void RequestRestart() OVERRIDE {} |
+ |
+ virtual void RequestShutdown() OVERRIDE {} |
+ |
private: |
void Update() { |
// We pause at 0 and 100% so that it's easier to check those conditions. |