author Kyle Huey <khuey@kylehuey.com>
Sat, 30 Jan 2016 09:05:36 -0800
changeset 282388 e22b3043887ed36bf2c634c2924a7c8d39d226b1
parent 103019 a16372ce30b5f6b747246b01fcd215a4bf3b6342
permissions -rw-r--r--
Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsISupports.idl"

 * An interface to open a dialog to ask to permission to accept the cookie.

interface mozIDOMWindowProxy;
interface nsICookie;

[scriptable, uuid(65ca07c3-6241-4de1-bf41-3336470499db)]
interface nsICookiePromptService : nsISupports
  const uint32_t DENY_COOKIE = 0;
  const uint32_t ACCEPT_COOKIE = 1;
  const uint32_t ACCEPT_SESSION_COOKIE = 2;

  /* Open a dialog that asks for permission to accept a cookie
   * @param parent
   * @param cookie
   * @param hostname          the host that wants to set the cookie, 
   *                           not the domain: part of the cookie
   * @param cookiesFromHost   the number of cookies there are already for this host
   * @param changingCookie    are we changing this cookie?
   * @param rememberDecision  should we set the matching permission for this host?
   * @returns                 0 == deny cookie
   *                          1 == accept cookie
   *                          2 == accept cookie for current session

  long cookieDialog(in mozIDOMWindowProxy parent,
                    in nsICookie cookie,
                    in ACString hostname,
                    in long cookiesFromHost,
                    in boolean changingCookie,
                    out boolean rememberDecision);

#define NS_COOKIEPROMPTSERVICE_CONTRACTID "@mozilla.org/embedcomp/cookieprompt-service;1"