1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/xpfe/appshell/public/nsIPopupWindowManager.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,35 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +/** 1.10 + * This is the interface to the Popup Window Manager: an object which 1.11 + * maintains popup window permissions by website. 1.12 + */ 1.13 + 1.14 +#include "nsISupports.idl" 1.15 + 1.16 +interface nsIPrincipal; 1.17 + 1.18 +[scriptable, uuid(66386aa9-2088-4bae-82c7-9f58bc02be64)] 1.19 +interface nsIPopupWindowManager : nsISupports { 1.20 + 1.21 + /** 1.22 + * These values are returned by the testPermission method 1.23 + */ 1.24 + const uint32_t ALLOW_POPUP = 1; 1.25 + const uint32_t DENY_POPUP = 2; 1.26 + const uint32_t ALLOW_POPUP_WITH_PREJUDICE = 3; 1.27 + 1.28 + /** 1.29 + * Test whether a website has permission to show a popup window. 1.30 + * @param principal is the principal to be tested 1.31 + * @return one of the enumerated permission actions defined above 1.32 + */ 1.33 + uint32_t testPermission(in nsIPrincipal principal); 1.34 +}; 1.35 + 1.36 +%{ C++ 1.37 +#define NS_POPUPWINDOWMANAGER_CONTRACTID "@mozilla.org/PopupWindowManager;1" 1.38 +%}