1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 * 3 * This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7#include "nsISupports.idl" 8 9webidl BrowsingContext; 10 11%{ C++ 12namespace mozilla { 13class OriginAttributes; 14namespace dom { 15class BrowserParent; 16} // namespace dom 17} // namespace mozilla 18%} 19[ref] native const_OriginAttributes(const mozilla::OriginAttributes); 20[ptr] native BrowserParent(mozilla::dom::BrowserParent); 21 22/* 23 * nsIBrowsingContextReadyCallback.browsingContextReady() is called within 24 * nsFrameLoader to indicate that the browsing context for a newly opened 25 * window/tab is ready. 26 */ 27[uuid(0524ee06-7f4c-4cd3-ab80-084562745cad)] 28interface nsIBrowsingContextReadyCallback : nsISupports 29{ 30 void browsingContextReady(in BrowsingContext bc); 31}; 32 33/** 34 * nsIOpenWindowInfo is a helper type which contains details used when opening 35 * new content windows. This object is used to correctly create new initial 36 * content documents when creating a new window. 37 */ 38[scriptable, builtinclass, uuid(30359edb-126c-4f65-ae80-07fb158697f9)] 39interface nsIOpenWindowInfo : nsISupports { 40 /** BrowsingContext which requested the creation of this new window */ 41 [infallible] 42 readonly attribute BrowsingContext parent; 43 44 /** If `true`, the content document should be created initially-remote */ 45 [infallible] 46 readonly attribute boolean isRemote; 47 48 /** Should |opener| be set on the newly-created content window? */ 49 [infallible] 50 readonly attribute boolean forceNoOpener; 51 52 /** Whether this is a window opened for printing */ 53 [infallible] 54 readonly attribute boolean isForPrinting; 55 56 /** 57 * Whether this is a window opened for window.print(). 58 * When this is true, isForPrinting is necessarily true as well. 59 */ 60 [infallible] 61 readonly attribute boolean isForWindowDotPrint; 62 63 /** BrowserParent instance to use in the new window */ 64 [notxpcom, nostdcall] 65 BrowserParent getNextRemoteBrowser(); 66 67 /** Origin Attributes for the to-be-created toplevel BrowsingContext */ 68 [implicit_jscontext, binaryname(ScriptableOriginAttributes)] 69 readonly attribute jsval originAttributes; 70 71 [notxpcom, nostdcall, binaryname(GetOriginAttributes)] 72 const_OriginAttributes binaryGetOriginAttributes(); 73 74 /* Callback to invoke when the browsing context for a new window is ready. */ 75 [notxpcom, nostdcall] 76 nsIBrowsingContextReadyCallback browsingContextReadyCallback(); 77}; 78