michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: interface nsIDocShell; michael@0: interface nsIAutoCompletePopup; michael@0: interface nsIDOMHTMLInputElement; michael@0: michael@0: /* michael@0: * nsIFormFillController is an interface for controlling form fill behavior michael@0: * on HTML documents. Any number of docShells can be controller concurrently. michael@0: * While a docShell is attached, all HTML documents that are loaded within it michael@0: * will have a focus listener attached that will listen for when a text input michael@0: * is focused. When this happens, the input will be bound to the michael@0: * global nsIAutoCompleteController service. michael@0: */ michael@0: michael@0: [scriptable, uuid(07f0a0dc-f6e9-4cdd-a55f-56d770523a4c)] michael@0: interface nsIFormFillController : nsISupports michael@0: { michael@0: /* michael@0: * Start controlling form fill behavior for the given browser michael@0: * michael@0: * @param docShell - The docShell to attach to michael@0: * @param popup - The popup to show when autocomplete results are available michael@0: */ michael@0: void attachToBrowser(in nsIDocShell docShell, in nsIAutoCompletePopup popup); michael@0: michael@0: /* michael@0: * Stop controlling form fill behavior for the given browser michael@0: * michael@0: * @param docShell - The docShell to detach from michael@0: */ michael@0: void detachFromBrowser(in nsIDocShell docShell); michael@0: michael@0: /* michael@0: * Mark the specified element as being managed by password manager. michael@0: * Autocomplete requests will be handed off to the password manager, and will michael@0: * not be stored in form history. michael@0: * michael@0: * @param aInput - The HTML element to tag michael@0: */ michael@0: void markAsLoginManagerField(in nsIDOMHTMLInputElement aInput); michael@0: };