Necko:nsIAuthPrompt2: Difference between revisions

Jump to navigation Jump to search
update per final changes
(update interfaces)
(update per final changes)
 
Line 88: Line 88:
   * the user.
   * the user.
   */
   */
   attribute AString userName;
   attribute AString username;


   /**
   /**
Line 196: Line 196:
   *        return value of false.
   *        return value of false.
   */
   */
   boolean promptUsernameAndPassword(in nsIChannel aChannel,
   boolean promptAuth(in nsIChannel aChannel,
                                    in PRUint32 level,
                    in PRUint32 level,
                                    in nsIAuthInformation authInfo);
                    in nsIAuthInformation authInfo);


   /**
   /**
Line 217: Line 217:
   *        the caller should fall back to promptUsernameAndPassword().
   *        the caller should fall back to promptUsernameAndPassword().
   */
   */
   nsICancelable promptPasswordAsync(in nsIChannel aChannel,
   nsICancelable asyncPromptAuth(in nsIChannel aChannel,
                                    in nsIAuthPromptCallback aCallback,
                                in nsIAuthPromptCallback aCallback,
                                    in nsISupports aContext,
                                in nsISupports aContext,
                                    in PRUint32 level,
                                in PRUint32 level,
                                    in nsIAuthInformation authInfo);
                                in nsIAuthInformation authInfo);
  };
  };


Line 255: Line 255:
   */
   */
  [scriptable, uuid(...)]
  [scriptable, uuid(...)]
  interface nsIAuthPrompt2Factory
  interface nsIPromptFactory
  {
  {
   /**
   /**
   * Returns an object implementing nsIAuthPrompt2 that creates dialogs
   * Returns an object implementing the specified interface that creates
   * parented to aParent.
   * prompts parented to aParent.
   */
   */
   nsIAuthPrompt2 getAuthPrompt2(in nsIDOMWindow aParent);
   void getPrompt(in nsIDOMWindow aParent, in nsIIDRef iid,
                [iid_is(iid),retval] out nsQIResult result);
  };
  };


This allows more flexibility than the current interface that wraps an nsIPrompt.
This allows more flexibility than the current interface that wraps an nsIPrompt.


For actually adding the checkbox, nsIPromptService2 will need a method like promptUsernameAndPassword2Checkbox.
For actually adding the checkbox, nsIPromptService2 will need a method like promptUsernameAndPassword2Checkbox (I decided on naming it promptAuth)
Confirmed users
195

edits

Navigation menu