diff options
author | haruki@chromium.org <haruki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-12 01:31:47 +0000 |
---|---|---|
committer | haruki@chromium.org <haruki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-12 01:31:47 +0000 |
commit | 370022ded7c40e0650439ae5717ab65ab916c521 (patch) | |
tree | b83d438968e982210a47a9c06c801f484d656eb4 /chromeos/dbus | |
parent | f5c0adb349f5d1aaa4cf559b6064cb2338427dc7 (diff) | |
download | chromium_src-370022ded7c40e0650439ae5717ab65ab916c521.zip chromium_src-370022ded7c40e0650439ae5717ab65ab916c521.tar.gz chromium_src-370022ded7c40e0650439ae5717ab65ab916c521.tar.bz2 |
Replace calls to PowerManagerClient's Notify* methods with SessionManagerClient's methods.
Use SessionManagerClient's NotifyLockScreen{Shown,Dismissed} to have the "locked" status more in-sync.
session_manager broadcasts ScreenIs{Locked,Unlocked} signals and power_manager listens to them and take appropriate action.
See the related changes attached to the bug.
Another following cl will remove powerd's handlers in power_manager.
BUG=chromium-os:32457
TEST=unittests and manually verify you can lock/unlock the screen.
Review URL: https://chromiumcodereview.appspot.com/10913189
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156201 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/dbus')
-rw-r--r-- | chromeos/dbus/mock_power_manager_client.h | 2 | ||||
-rw-r--r-- | chromeos/dbus/power_manager_client.cc | 11 | ||||
-rw-r--r-- | chromeos/dbus/power_manager_client.h | 6 |
3 files changed, 0 insertions, 19 deletions
diff --git a/chromeos/dbus/mock_power_manager_client.h b/chromeos/dbus/mock_power_manager_client.h index 6d5ee18..76a5458 100644 --- a/chromeos/dbus/mock_power_manager_client.h +++ b/chromeos/dbus/mock_power_manager_client.h @@ -41,8 +41,6 @@ class MockPowerManagerClient : public PowerManagerClient { int, const PowerStateRequestIdCallback&)); MOCK_METHOD1(SetIsProjecting, void(bool)); - MOCK_METHOD0(NotifyScreenLockCompleted, void(void)); - MOCK_METHOD0(NotifyScreenUnlockCompleted, void(void)); }; } // namespace chromeos diff --git a/chromeos/dbus/power_manager_client.cc b/chromeos/dbus/power_manager_client.cc index fe1fd36..766a77a 100644 --- a/chromeos/dbus/power_manager_client.cc +++ b/chromeos/dbus/power_manager_client.cc @@ -281,14 +281,6 @@ class PowerManagerClientImpl : public PowerManagerClient { dbus::ObjectProxy::EmptyResponseCallback()); } - virtual void NotifyScreenLockCompleted() OVERRIDE { - SimpleMethodCallToPowerManager(power_manager::kScreenIsLockedMethod); - } - - virtual void NotifyScreenUnlockCompleted() OVERRIDE { - SimpleMethodCallToPowerManager(power_manager::kScreenIsUnlockedMethod); - } - private: // Called when a dbus signal is initially connected. void SignalConnected(const std::string& interface_name, @@ -609,9 +601,6 @@ class PowerManagerClientStubImpl : public PowerManagerClient { const PowerStateRequestIdCallback& callback) OVERRIDE {} virtual void SetIsProjecting(bool is_projecting) OVERRIDE {} - virtual void NotifyScreenLockCompleted() OVERRIDE {} - virtual void NotifyScreenUnlockCompleted() OVERRIDE {} - private: void Update() { if (pause_count_ > 0) { diff --git a/chromeos/dbus/power_manager_client.h b/chromeos/dbus/power_manager_client.h index 5be8298..5353e20 100644 --- a/chromeos/dbus/power_manager_client.h +++ b/chromeos/dbus/power_manager_client.h @@ -131,12 +131,6 @@ class CHROMEOS_EXPORT PowerManagerClient { // Requests shutdown of the system. virtual void RequestShutdown() = 0; - // Notifies PowerManager that screen lock has been completed. - virtual void NotifyScreenLockCompleted() = 0; - - // Notifies PowerManager that screen is unlocked. - virtual void NotifyScreenUnlockCompleted() = 0; - // Idle management functions: // Calculates idle time asynchronously, after the idle time request has |