|
1 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
4 |
|
5 #include "nsISupports.idl" |
|
6 |
|
7 interface nsIDocShell; |
|
8 interface nsIAutoCompletePopup; |
|
9 interface nsIDOMHTMLInputElement; |
|
10 |
|
11 /* |
|
12 * nsIFormFillController is an interface for controlling form fill behavior |
|
13 * on HTML documents. Any number of docShells can be controller concurrently. |
|
14 * While a docShell is attached, all HTML documents that are loaded within it |
|
15 * will have a focus listener attached that will listen for when a text input |
|
16 * is focused. When this happens, the input will be bound to the |
|
17 * global nsIAutoCompleteController service. |
|
18 */ |
|
19 |
|
20 [scriptable, uuid(07f0a0dc-f6e9-4cdd-a55f-56d770523a4c)] |
|
21 interface nsIFormFillController : nsISupports |
|
22 { |
|
23 /* |
|
24 * Start controlling form fill behavior for the given browser |
|
25 * |
|
26 * @param docShell - The docShell to attach to |
|
27 * @param popup - The popup to show when autocomplete results are available |
|
28 */ |
|
29 void attachToBrowser(in nsIDocShell docShell, in nsIAutoCompletePopup popup); |
|
30 |
|
31 /* |
|
32 * Stop controlling form fill behavior for the given browser |
|
33 * |
|
34 * @param docShell - The docShell to detach from |
|
35 */ |
|
36 void detachFromBrowser(in nsIDocShell docShell); |
|
37 |
|
38 /* |
|
39 * Mark the specified <input> element as being managed by password manager. |
|
40 * Autocomplete requests will be handed off to the password manager, and will |
|
41 * not be stored in form history. |
|
42 * |
|
43 * @param aInput - The HTML <input> element to tag |
|
44 */ |
|
45 void markAsLoginManagerField(in nsIDOMHTMLInputElement aInput); |
|
46 }; |