summaryrefslogtreecommitdiffstats
path: root/chromeos/dbus/mock_session_manager_client.h
diff options
context:
space:
mode:
authorderat <derat@chromium.org>2015-01-13 13:46:25 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-13 21:48:07 +0000
commit85e90a06749fe630317eb01ca3487d5a78e9c10a (patch)
tree166c104d5e5e1a1bcb562fa7c74a01afe67ff703 /chromeos/dbus/mock_session_manager_client.h
parent3a0efca1a48563a50e634eeb3401b43b7e6b2da7 (diff)
downloadchromium_src-85e90a06749fe630317eb01ca3487d5a78e9c10a.zip
chromium_src-85e90a06749fe630317eb01ca3487d5a78e9c10a.tar.gz
chromium_src-85e90a06749fe630317eb01ca3487d5a78e9c10a.tar.bz2
chromeos: Make CheckIdleStateIsLocked() query D-Bus client.
Make the Chrome OS implementation of CheckIdleStateIsLocked() (used by the chrome.idle API) get the lock state from chromeos::SessionManagerClient instead of depending on ash::SessionStateDelegate (which reaches into chrome/browser/chromeos/login/). This makes it possible for the idle code to be later moved under ui/base/ instead of living in chrome/browser/, permitting the chrome.idle API to be moved from chrome/ to extensions/. As part of this, make SessionManagerClient cache the most-recently-received-from-session_manager screen-lock state. Previously it just passed state updates to its observers, but the idle functions lack a class that can register itself as an observer. BUG=446320 Review URL: https://codereview.chromium.org/852453005 Cr-Commit-Position: refs/heads/master@{#311333}
Diffstat (limited to 'chromeos/dbus/mock_session_manager_client.h')
-rw-r--r--chromeos/dbus/mock_session_manager_client.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/chromeos/dbus/mock_session_manager_client.h b/chromeos/dbus/mock_session_manager_client.h
index cdc5d6d..3a88e52 100644
--- a/chromeos/dbus/mock_session_manager_client.h
+++ b/chromeos/dbus/mock_session_manager_client.h
@@ -22,6 +22,7 @@ class MockSessionManagerClient : public SessionManagerClient {
MOCK_METHOD1(AddObserver, void(Observer*));
MOCK_METHOD1(RemoveObserver, void(Observer*));
MOCK_CONST_METHOD1(HasObserver, bool(const Observer*));
+ MOCK_CONST_METHOD0(IsScreenLocked, bool(void));
MOCK_METHOD0(EmitLoginPromptVisible, void(void));
MOCK_METHOD2(RestartJob, void(int, const std::string&));
MOCK_METHOD1(StartSession, void(const std::string&));