summaryrefslogtreecommitdiffstats
path: root/chromeos/dbus
diff options
context:
space:
mode:
Diffstat (limited to 'chromeos/dbus')
-rw-r--r--chromeos/dbus/fake_power_manager_client.cc3
-rw-r--r--chromeos/dbus/fake_power_manager_client.h1
-rw-r--r--chromeos/dbus/power_manager_client.cc46
-rw-r--r--chromeos/dbus/power_manager_client.h14
4 files changed, 0 insertions, 64 deletions
diff --git a/chromeos/dbus/fake_power_manager_client.cc b/chromeos/dbus/fake_power_manager_client.cc
index 0b0593b..3c70a6f 100644
--- a/chromeos/dbus/fake_power_manager_client.cc
+++ b/chromeos/dbus/fake_power_manager_client.cc
@@ -36,9 +36,6 @@ void FakePowerManagerClient::SetPolicy(
void FakePowerManagerClient::RequestShutdown() {
}
-void FakePowerManagerClient::RequestIdleNotification(int64 threshold_secs) {
-}
-
void FakePowerManagerClient::DecreaseScreenBrightness(bool allow_off) {
}
diff --git a/chromeos/dbus/fake_power_manager_client.h b/chromeos/dbus/fake_power_manager_client.h
index ea4fa38..d89bb51 100644
--- a/chromeos/dbus/fake_power_manager_client.h
+++ b/chromeos/dbus/fake_power_manager_client.h
@@ -40,7 +40,6 @@ class FakePowerManagerClient : public PowerManagerClient {
virtual void RequestStatusUpdate() OVERRIDE;
virtual void RequestRestart() OVERRIDE;
virtual void RequestShutdown() OVERRIDE;
- virtual void RequestIdleNotification(int64 threshold_secs) OVERRIDE;
virtual void NotifyUserActivity(
power_manager::UserActivityType type) OVERRIDE;
virtual void NotifyVideoActivity(bool is_fullscreen) OVERRIDE;
diff --git a/chromeos/dbus/power_manager_client.cc b/chromeos/dbus/power_manager_client.cc
index 23b4c26..82b934a 100644
--- a/chromeos/dbus/power_manager_client.cc
+++ b/chromeos/dbus/power_manager_client.cc
@@ -147,18 +147,6 @@ class PowerManagerClientImpl : public PowerManagerClient {
SimpleMethodCallToPowerManager(power_manager::kRequestShutdownMethod);
}
- virtual void RequestIdleNotification(int64 threshold) OVERRIDE {
- dbus::MethodCall method_call(power_manager::kPowerManagerInterface,
- power_manager::kRequestIdleNotification);
- dbus::MessageWriter writer(&method_call);
- writer.AppendInt64(threshold);
-
- power_manager_proxy_->CallMethod(
- &method_call,
- dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
- dbus::ObjectProxy::EmptyResponseCallback());
- }
-
virtual void NotifyUserActivity(
power_manager::UserActivityType type) OVERRIDE {
dbus::MethodCall method_call(
@@ -262,14 +250,6 @@ class PowerManagerClientImpl : public PowerManagerClient {
power_manager_proxy_->ConnectToSignal(
power_manager::kPowerManagerInterface,
- power_manager::kIdleNotifySignal,
- base::Bind(&PowerManagerClientImpl::IdleNotifySignalReceived,
- weak_ptr_factory_.GetWeakPtr()),
- base::Bind(&PowerManagerClientImpl::SignalConnected,
- weak_ptr_factory_.GetWeakPtr()));
-
- power_manager_proxy_->ConnectToSignal(
- power_manager::kPowerManagerInterface,
power_manager::kInputEventSignal,
base::Bind(&PowerManagerClientImpl::InputEventReceived,
weak_ptr_factory_.GetWeakPtr()),
@@ -448,20 +428,6 @@ class PowerManagerClientImpl : public PowerManagerClient {
VLOG(1) << "Registered suspend delay " << suspend_delay_id_;
}
- void IdleNotifySignalReceived(dbus::Signal* signal) {
- dbus::MessageReader reader(signal);
- int64 threshold = 0;
- if (!reader.PopInt64(&threshold)) {
- LOG(ERROR) << "Idle Notify signal had incorrect parameters: "
- << signal->ToString();
- return;
- }
- DCHECK_GT(threshold, 0);
-
- VLOG(1) << "Idle Notify: " << threshold;
- FOR_EACH_OBSERVER(Observer, observers_, IdleNotify(threshold));
- }
-
void SuspendImminentReceived(dbus::Signal* signal) {
if (!has_suspend_delay_id_) {
LOG(ERROR) << "Received unrequested "
@@ -741,14 +707,6 @@ class PowerManagerClientStubImpl : public PowerManagerClient {
virtual void RequestRestart() OVERRIDE {}
virtual void RequestShutdown() OVERRIDE {}
- virtual void RequestIdleNotification(int64 threshold) OVERRIDE {
- base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE,
- base::Bind(&PowerManagerClientStubImpl::TriggerIdleNotify,
- weak_ptr_factory_.GetWeakPtr(), threshold),
- base::TimeDelta::FromMilliseconds(threshold));
- }
-
virtual void NotifyUserActivity(
power_manager::UserActivityType type) OVERRIDE {}
virtual void NotifyVideoActivity(bool is_fullscreen) OVERRIDE {}
@@ -835,10 +793,6 @@ class PowerManagerClientStubImpl : public PowerManagerClient {
BrightnessChanged(brightness_level, user_initiated));
}
- void TriggerIdleNotify(int64 threshold) {
- FOR_EACH_OBSERVER(Observer, observers_, IdleNotify(threshold));
- }
-
bool discharging_;
int battery_percentage_;
double brightness_;
diff --git a/chromeos/dbus/power_manager_client.h b/chromeos/dbus/power_manager_client.h
index e728f10..a24312b 100644
--- a/chromeos/dbus/power_manager_client.h
+++ b/chromeos/dbus/power_manager_client.h
@@ -22,8 +22,6 @@ class PowerSupplyProperties;
namespace chromeos {
-typedef base::Callback<void(void)> IdleNotificationCallback;
-
// Callback used for getting the current screen brightness. The param is in the
// range [0.0, 100.0].
typedef base::Callback<void(double)> GetScreenBrightnessPercentCallback;
@@ -59,9 +57,6 @@ class CHROMEOS_EXPORT PowerManagerClient : public DBusClient {
virtual void PowerChanged(
const power_manager::PowerSupplyProperties& proto) {}
- // Called when we go idle for threshold time.
- virtual void IdleNotify(int64 threshold_secs) {}
-
// Called when the system is about to suspend. Suspend is deferred until
// all observers' implementations of this method have finished running.
//
@@ -127,15 +122,6 @@ class CHROMEOS_EXPORT PowerManagerClient : public DBusClient {
// Requests shutdown of the system.
virtual void RequestShutdown() = 0;
- // Idle management functions:
-
- // Requests notification for Idle at a certain threshold.
- // NOTE: This notification is one shot, once the machine has been idle for
- // threshold time, a notification will be sent and then that request will be
- // removed from the notification queue. If you wish notifications the next
- // time the machine goes idle for that much time, request again.
- virtual void RequestIdleNotification(int64 threshold_secs) = 0;
-
// Notifies the power manager that the user is active (i.e. generating input
// events).
virtual void NotifyUserActivity(power_manager::UserActivityType type) = 0;