Index: chrome/common/extensions/api/screenlock_private.idl |
diff --git a/chrome/common/extensions/api/screenlock_private.idl b/chrome/common/extensions/api/screenlock_private.idl |
new file mode 100644 |
index 0000000000000000000000000000000000000000..cdccdca908c444139bd98a73975c3453b8f269b4 |
--- /dev/null |
+++ b/chrome/common/extensions/api/screenlock_private.idl |
@@ -0,0 +1,26 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+// Control and monitor the screen locker. |
+[platforms=("chromeos"), implemented_in="chrome/browser/chromeos/extensions/screenlock_private_api.h", permissions=screenlockPrivate] |
+namespace screenlockPrivate { |
+ callback BooleanCallback = void(boolean locked); |
+ |
+ interface Functions { |
+ // Returns true if the screen is currently locked, false otherwise. |
+ static void getLocked(BooleanCallback callback); |
+ |
+ // Set <code>locked=true</code> to lock the screen, |
+ // <code>locked=false</code> to unlock it. |
+ static void setLocked(boolean locked); |
+ |
+ // Show a message to the user on the unlock UI if the screen is locked. |
+ static void showMessage(DOMString message); |
+ }; |
+ |
+ interface Events { |
+ // Fires whenever the screen is locked or unlocked. |
+ static void onChange(boolean locked); |
Matt Perry
2013/11/12 21:26:30
nit: onChanged to be consistent with other events
benjhayden
2013/11/13 00:46:23
Done.
|
+ }; |
+}; |