toolkit/components/autocomplete/nsIAutoCompleteInput.idl

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     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/. */
     5 #include "nsISupports.idl"
     6 #include "nsIAutoCompleteController.idl"
     8 interface nsIAutoCompletePopup;
    10 [scriptable, uuid(fadb2bb9-3e2e-4ca0-b0e0-0982b8dda9dc)]
    11 interface nsIAutoCompleteInput : nsISupports
    12 {  
    13   /*
    14    * The result view that will be used to display results
    15    */
    16   readonly attribute nsIAutoCompletePopup popup;
    18   /*
    19    * The controller.
    20    */
    21   readonly attribute nsIAutoCompleteController controller;
    23   /* 
    24    * Indicates if the popup is currently open
    25    */
    26   attribute boolean popupOpen;
    28   /*
    29    * Option to disable autocomplete functionality
    30    */ 
    31   attribute boolean disableAutoComplete;
    33   /* 
    34    * If a search result has its defaultIndex set, this will optionally
    35    * try to complete the text in the textbox to the entire text of the
    36    * result at the default index as the user types
    37    */
    38   attribute boolean completeDefaultIndex;
    40   /*
    41    * complete text in the textbox as the user selects from the dropdown
    42    * options if set to true
    43    */
    44   attribute boolean completeSelectedIndex;
    46   /* 
    47    * Option for completing to the default result whenever the user hits
    48    * enter or the textbox loses focus
    49    */
    50   attribute boolean forceComplete;
    52   /*
    53    * Option to open the popup only after a certain number of results are available
    54    */
    55   attribute unsigned long minResultsForPopup;
    57   /*
    58    * The maximum number of rows to show in the autocomplete popup.
    59    */
    60   attribute unsigned long maxRows;
    62   /*
    63    * Option to show a second column in the popup which contains
    64    * the comment for each autocomplete result
    65    */
    66   attribute boolean showCommentColumn;
    68   /*
    69    * Option to show a third column in the popup which contains
    70    * an additional image for each autocomplete result
    71    */
    72   attribute boolean showImageColumn;
    74   /* 
    75    * Number of milliseconds after a keystroke before a search begins
    76    */
    77   attribute unsigned long timeout;
    79   /*
    80    * An extra parameter to configure searches with.
    81    */
    82   attribute AString searchParam;
    84   /*
    85    * The number of autocomplete session to search
    86    */
    87   readonly attribute unsigned long searchCount;
    89   /*
    90    * Get the name of one of the autocomplete search session objects
    91    */
    92   ACString getSearchAt(in unsigned long index);
    94   /*
    95    * The value of text in the autocomplete textbox
    96    */
    97   attribute AString textValue;
    99   /*
   100    * Report the starting index of the cursor in the textbox
   101    */
   102   readonly attribute long selectionStart;
   104   /*
   105    * Report the ending index of the cursor in the textbox
   106    */
   107   readonly attribute long selectionEnd;
   109   /*
   110    * Select a range of text in the autocomplete textbox
   111    */
   112   void selectTextRange(in long startIndex, in long endIndex);
   114   /*
   115    * Notification that the search has started
   116    */
   117   void onSearchBegin();
   119   /*
   120    * Notification that the search concluded successfully
   121    */
   122   void onSearchComplete();
   124   /*
   125    * Notification that the user selected and entered a result item
   126    *
   127    * @return True if the user wishes to prevent the enter
   128    */
   129   boolean onTextEntered();
   131   /*
   132    * Notification that the user cancelled the autocomplete session
   133    *
   134    * @return True if the user wishes to prevent the revert
   135    */
   136   boolean onTextReverted();
   138   /*
   139    * This popup should consume or dispatch the rollup event.
   140    * TRUE: should consume; FALSE: should dispatch.
   141    */
   142   readonly attribute boolean consumeRollupEvent;
   144   /*
   145    * Indicates whether this input is in a "private browsing" context.
   146    * nsIAutoCompleteSearches for these inputs should not persist any data to disk
   147    * (such as a history database).
   148    */
   149   readonly attribute boolean inPrivateContext;
   150 };

mercurial