• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
4
5// Control and monitor the screen locker.
6[platforms=("chromeos"), implemented_in="chrome/browser/chromeos/extensions/screenlock_private_api.h", permissions=screenlockPrivate]
7namespace screenlockPrivate {
8  callback BooleanCallback = void(boolean locked);
9
10  interface Functions {
11    // Returns true if the screen is currently locked, false otherwise.
12    static void getLocked(BooleanCallback callback);
13
14    // Set <code>locked=true</code> to lock the screen,
15    // <code>locked=false</code> to unlock it.
16    static void setLocked(boolean locked);
17
18    // Show a message to the user on the unlock UI if the screen is locked.
19    static void showMessage(DOMString message);
20  };
21
22  interface Events {
23    // Fires whenever the screen is locked or unlocked.
24    static void onChanged(boolean locked);
25  };
26};
27