nsISecurityWarningDialogs.idl 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3. * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4. *
  5. * The contents of this file are subject to the Mozilla Public License Version
  6. * 1.1 (the "License"); you may not use this file except in compliance with
  7. * the License. You may obtain a copy of the License at
  8. * http://www.mozilla.org/MPL/
  9. *
  10. * Software distributed under the License is distributed on an "AS IS" basis,
  11. * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12. * for the specific language governing rights and limitations under the
  13. * License.
  14. *
  15. * The Original Code is mozilla.org code.
  16. *
  17. * The Initial Developer of the Original Code is
  18. * Netscape Communications Corporation.
  19. * Portions created by the Initial Developer are Copyright (C) 2001
  20. * the Initial Developer. All Rights Reserved.
  21. *
  22. * Contributor(s):
  23. * Terry Hayes <[email protected]>
  24. *
  25. * Alternatively, the contents of this file may be used under the terms of
  26. * either the GNU General Public License Version 2 or later (the "GPL"), or
  27. * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  28. * in which case the provisions of the GPL or the LGPL are applicable instead
  29. * of those above. If you wish to allow use of your version of this file only
  30. * under the terms of either the GPL or the LGPL, and not to allow others to
  31. * use your version of this file under the terms of the MPL, indicate your
  32. * decision by deleting the provisions above and replace them with the notice
  33. * and other provisions required by the GPL or the LGPL. If you do not delete
  34. * the provisions above, a recipient may use your version of this file under
  35. * the terms of any one of the MPL, the GPL or the LGPL.
  36. *
  37. * ***** END LICENSE BLOCK ***** */
  38. #include "nsISupports.idl"
  39. interface nsIInterfaceRequestor;
  40. /**
  41. * Functions that display warnings for transitions between secure
  42. * and insecure pages, posts to insecure servers etc.
  43. *
  44. * @status FROZEN
  45. */
  46. [scriptable, uuid(1c399d06-1dd2-11b2-bc58-c87cbcacdb78)]
  47. interface nsISecurityWarningDialogs : nsISupports
  48. {
  49. /**
  50. * Inform the user that a transition
  51. * from an insecure page
  52. * to a secure page
  53. * is happening.
  54. *
  55. * @param ctx A user interface context.
  56. *
  57. * @return true if the user confirms to continue
  58. */
  59. boolean confirmEnteringSecure(in nsIInterfaceRequestor ctx);
  60. /**
  61. * Inform the user that a transition
  62. * from an insecure page
  63. * or from a secure page
  64. * to a weak security page
  65. * is happening.
  66. *
  67. * @param ctx A user interface context.
  68. *
  69. * @return true if the user confirms to continue
  70. */
  71. boolean confirmEnteringWeak(in nsIInterfaceRequestor ctx);
  72. /**
  73. * Inform the user that a transition
  74. * from a secure page
  75. * to an insecure page
  76. * is happening.
  77. *
  78. * @param ctx A user interface context.
  79. *
  80. * @return true if the user confirms to continue
  81. */
  82. boolean confirmLeavingSecure(in nsIInterfaceRequestor ctx);
  83. /**
  84. * Inform the user the currently displayed page
  85. * contains some secure and some insecure page components.
  86. *
  87. * @param ctx A user interface context.
  88. *
  89. * @return true if the user decides to show insecure objects.
  90. */
  91. boolean confirmMixedMode(in nsIInterfaceRequestor ctx);
  92. /**
  93. * Inform the user that information is being submitted
  94. * to an insecure page.
  95. *
  96. * @param ctx A user interface context.
  97. *
  98. * @return true if the user confirms to submit.
  99. */
  100. boolean confirmPostToInsecure(in nsIInterfaceRequestor ctx);
  101. /**
  102. * Inform the user: Although the currently displayed
  103. * page was loaded using a secure connection, and the UI probably
  104. * currently indicates a secure page,
  105. * that information is being submitted to an insecure page.
  106. *
  107. * @param ctx A user interface context.
  108. *
  109. * @return true if the user confirms to submit.
  110. */
  111. boolean confirmPostToInsecureFromSecure(in nsIInterfaceRequestor ctx);
  112. };
  113. %{C++
  114. #define NS_SECURITYWARNINGDIALOGS_CONTRACTID "@mozilla.org/nsSecurityWarningDialogs;1"
  115. %}