Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Side by Side Diff: chrome/common/extensions/api/screenlock_private.idl

Issue 289013002: cros: Clean up screenlockPrivate plumbing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test compile Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Control and monitor the screen locker. 5 // Control and monitor the screen locker.
6 [permissions=screenlockPrivate, nodoc] 6 [permissions=screenlockPrivate, nodoc]
7 namespace screenlockPrivate { 7 namespace screenlockPrivate {
8 // Supported authentication types shown on the user pod. 8 // Supported authentication types shown on the user pod.
9 // |offlinePassword|: The standard password field, which authenticates using 9 // |offlinePassword|: The standard password field, which authenticates using
10 // the user's regular password. The $(ref:onAuthAttempted)() 10 // the user's regular password. The $(ref:onAuthAttempted)()
(...skipping 14 matching lines...) Expand all
25 25
26 // Set <code>locked=true</code> to lock the screen, 26 // Set <code>locked=true</code> to lock the screen,
27 // <code>locked=false</code> to unlock it. 27 // <code>locked=false</code> to unlock it.
28 static void setLocked(boolean locked); 28 static void setLocked(boolean locked);
29 29
30 // Show a message to the user on the unlock UI if the screen is locked. 30 // Show a message to the user on the unlock UI if the screen is locked.
31 static void showMessage(DOMString message); 31 static void showMessage(DOMString message);
32 32
33 // Show a Button, an icon beside the input field on the user pod. 33 // Show a Button, an icon beside the input field on the user pod.
34 // |icon|: An extension resource of the icon image. 34 // |icon|: An extension resource of the icon image.
35 static void showButton(DOMString icon); 35 static void showButton(DOMString icon);
Tim Song 2014/05/16 18:38:47 This function should be renamed to something more
xiyuan 2014/05/16 23:00:57 showButton -> showCustomIcon hideButton -> hideCus
36 36
37 // Hides the button added by $(ref:showButton)(). 37 // Hides the button added by $(ref:showButton)().
38 static void hideButton(); 38 static void hideButton();
39 39
40 // Returns the current auth type used for the user pod. 40 // Returns the current auth type used for the user pod.
41 static void getAuthType(AuthTypeCallback callback); 41 static void getAuthType(AuthTypeCallback callback);
42 42
43 // Set the type of the authentication for the user pod. The input field 43 // Set the type of the authentication for the user pod. The input field
44 // area of the user pod below the user's portrait will be changed. 44 // area of the user pod below the user's portrait will be changed.
45 // |authType|: The type of authentication to use. 45 // |authType|: The type of authentication to use.
46 // |initialValue|: The initial value to populate the input field. 46 // |initialValue|: The initial value to populate the input field.
47 static void setAuthType(AuthType authType, optional DOMString initialValue); 47 static void setAuthType(AuthType authType, optional DOMString initialValue);
48 48
49 // Accepts or rejects the current auth attempt. 49 // Accepts or rejects the current auth attempt.
50 static void acceptAuthAttempt(boolean accept); 50 static void acceptAuthAttempt(boolean accept);
51 }; 51 };
52 52
53 interface Events { 53 interface Events {
54 // Fires whenever the screen is locked or unlocked. 54 // Fires whenever the screen is locked or unlocked.
55 static void onChanged(boolean locked); 55 static void onChanged(boolean locked);
56 56
57 // Fires when the user clicks on the Button shown by $(ref:showButton)(). 57 // Fires when the user clicks on the Button shown by $(ref:showButton)().
58 // This event is deprecated in favor of $(ref:onAuthAttempted).
58 static void onButtonClicked(); 59 static void onButtonClicked();
Tim Song 2014/05/16 18:38:47 Remove this event as it's never fired now.
xiyuan 2014/05/16 23:00:57 Done.
59 60
60 // Fires when the user attempts to authenticate with the user's input. 61 // Fires when the user attempts to authenticate with the user's input.
61 // There will be at most one auth attempt active at any time. 62 // There will be at most one auth attempt active at any time.
62 // Call $(ref:acceptAuthAttempt)() to accept or reject this attempt. 63 // Call $(ref:acceptAuthAttempt)() to accept or reject this attempt.
63 // Note: Some authentication types will not have an input. 64 // Note: Some authentication types will not have an input.
64 static void onAuthAttempted(AuthType type, DOMString input); 65 static void onAuthAttempted(AuthType type, DOMString input);
65 }; 66 };
66 }; 67 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698