michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /** michael@0: * This is the interface to the Popup Window Manager: an object which michael@0: * maintains popup window permissions by website. michael@0: */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: interface nsIPrincipal; michael@0: michael@0: [scriptable, uuid(66386aa9-2088-4bae-82c7-9f58bc02be64)] michael@0: interface nsIPopupWindowManager : nsISupports { michael@0: michael@0: /** michael@0: * These values are returned by the testPermission method michael@0: */ michael@0: const uint32_t ALLOW_POPUP = 1; michael@0: const uint32_t DENY_POPUP = 2; michael@0: const uint32_t ALLOW_POPUP_WITH_PREJUDICE = 3; michael@0: michael@0: /** michael@0: * Test whether a website has permission to show a popup window. michael@0: * @param principal is the principal to be tested michael@0: * @return one of the enumerated permission actions defined above michael@0: */ michael@0: uint32_t testPermission(in nsIPrincipal principal); michael@0: }; michael@0: michael@0: %{ C++ michael@0: #define NS_POPUPWINDOWMANAGER_CONTRACTID "@mozilla.org/PopupWindowManager;1" michael@0: %}