1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Control and monitor the screen locker.
6 [platforms=("chromeos"), implemented_in="chrome/browser/chromeos/extensions/screenlock_private_api.h", permissions=screenlockPrivate]
7 namespace screenlockPrivate {
8 callback BooleanCallback = void(boolean locked);
11 // Returns true if the screen is currently locked, false otherwise.
12 static void getLocked(BooleanCallback callback);
14 // Set <code>locked=true</code> to lock the screen,
15 // <code>locked=false</code> to unlock it.
16 static void setLocked(boolean locked);
18 // Show a message to the user on the unlock UI if the screen is locked.
19 static void showMessage(DOMString message);
21 // Show a button icon on the unlock UI if the screen is locked.
22 static void showButton(DOMString icon);
26 // Fires whenever the screen is locked or unlocked.
27 static void onChanged(boolean locked);
29 // Fires when the user presses the button on the unlock UI shown by
31 static void onButtonClicked();