toolkit/components/satchel/nsIFormFillController.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/toolkit/components/satchel/nsIFormFillController.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,46 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#include "nsISupports.idl"
     1.9 +
    1.10 +interface nsIDocShell;
    1.11 +interface nsIAutoCompletePopup;
    1.12 +interface nsIDOMHTMLInputElement;
    1.13 +
    1.14 +/*
    1.15 + * nsIFormFillController is an interface for controlling form fill behavior
    1.16 + * on HTML documents.  Any number of docShells can be controller concurrently.
    1.17 + * While a docShell is attached, all HTML documents that are loaded within it
    1.18 + * will have a focus listener attached that will listen for when a text input
    1.19 + * is focused.  When this happens, the input will be bound to the
    1.20 + * global nsIAutoCompleteController service.
    1.21 + */
    1.22 +
    1.23 +[scriptable, uuid(07f0a0dc-f6e9-4cdd-a55f-56d770523a4c)]
    1.24 +interface nsIFormFillController : nsISupports
    1.25 +{
    1.26 +  /*
    1.27 +   * Start controlling form fill behavior for the given browser
    1.28 +   *
    1.29 +   * @param docShell - The docShell to attach to
    1.30 +   * @param popup - The popup to show when autocomplete results are available
    1.31 +   */
    1.32 +  void attachToBrowser(in nsIDocShell docShell, in nsIAutoCompletePopup popup);
    1.33 +
    1.34 +  /*
    1.35 +   * Stop controlling form fill behavior for the given browser
    1.36 +   *
    1.37 +   * @param docShell - The docShell to detach from
    1.38 +   */
    1.39 +  void detachFromBrowser(in nsIDocShell docShell);
    1.40 +
    1.41 +  /*
    1.42 +   * Mark the specified <input> element as being managed by password manager.
    1.43 +   * Autocomplete requests will be handed off to the password manager, and will
    1.44 +   * not be stored in form history.
    1.45 +   *
    1.46 +   * @param aInput - The HTML <input> element to tag
    1.47 +   */
    1.48 +  void markAsLoginManagerField(in nsIDOMHTMLInputElement aInput);
    1.49 +};

mercurial