Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* vim:set tw=80 expandtab softtabstop=2 ts=2 sw=2: */ |
michael@0 | 3 | |
michael@0 | 4 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this file, |
michael@0 | 6 | * You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 7 | |
michael@0 | 8 | #include "nsIDOMMozBrowserFrame.idl" |
michael@0 | 9 | |
michael@0 | 10 | interface nsITabParent; |
michael@0 | 11 | |
michael@0 | 12 | [scriptable, builtinclass, uuid(929AED00-3E15-49B7-8CA2-75003715B7E7)] |
michael@0 | 13 | interface nsIMozBrowserFrame : nsIDOMMozBrowserFrame |
michael@0 | 14 | { |
michael@0 | 15 | /** |
michael@0 | 16 | * Gets whether this frame really is a browser or app frame. |
michael@0 | 17 | * |
michael@0 | 18 | * In order to really be a browser frame, this frame's |
michael@0 | 19 | * nsIDOMMozBrowserFrame::mozbrowser attribute must be true, and the frame |
michael@0 | 20 | * may have to pass various security checks. |
michael@0 | 21 | */ |
michael@0 | 22 | [infallible] readonly attribute boolean reallyIsBrowserOrApp; |
michael@0 | 23 | |
michael@0 | 24 | /** |
michael@0 | 25 | * Gets whether this frame really is an app frame. |
michael@0 | 26 | * |
michael@0 | 27 | * In order to really be an app frame, this frame must really be a browser |
michael@0 | 28 | * frame (this requirement will go away eventually), and the frame's mozapp |
michael@0 | 29 | * attribute must point to the manifest of a valid app. |
michael@0 | 30 | */ |
michael@0 | 31 | [infallible] readonly attribute boolean reallyIsApp; |
michael@0 | 32 | |
michael@0 | 33 | /** |
michael@0 | 34 | * This corresponds to the expecting-system-message attribute, which tells us |
michael@0 | 35 | * whether we should expect that this frame will receive a system message once |
michael@0 | 36 | * it starts up. |
michael@0 | 37 | * |
michael@0 | 38 | * It's the embedder's job to set this attribute on a frame. Its presence |
michael@0 | 39 | * might cause us to increase the priority of the frame's process. |
michael@0 | 40 | */ |
michael@0 | 41 | [infallible] readonly attribute boolean isExpectingSystemMessage; |
michael@0 | 42 | |
michael@0 | 43 | /** |
michael@0 | 44 | * Gets this frame's app manifest URL, if the frame really is an app frame. |
michael@0 | 45 | * Otherwise, returns the empty string. |
michael@0 | 46 | * |
michael@0 | 47 | * This method is guaranteed not to fail. |
michael@0 | 48 | */ |
michael@0 | 49 | readonly attribute AString appManifestURL; |
michael@0 | 50 | |
michael@0 | 51 | /** |
michael@0 | 52 | * Normally, a frame tries to create its frame loader when its src is |
michael@0 | 53 | * modified, or its contentWindow is accessed. |
michael@0 | 54 | * |
michael@0 | 55 | * disallowCreateFrameLoader prevents the frame element from creating its |
michael@0 | 56 | * frame loader (in the same way that not being inside a document prevents the |
michael@0 | 57 | * creation of a frame loader). allowCreateFrameLoader lifts this restriction. |
michael@0 | 58 | * |
michael@0 | 59 | * These methods are not re-entrant -- it is an error to call |
michael@0 | 60 | * disallowCreateFrameLoader twice without first calling allowFrameLoader. |
michael@0 | 61 | * |
michael@0 | 62 | * It's also an error to call either method if we already have a frame loader. |
michael@0 | 63 | */ |
michael@0 | 64 | void disallowCreateFrameLoader(); |
michael@0 | 65 | void allowCreateFrameLoader(); |
michael@0 | 66 | |
michael@0 | 67 | /** |
michael@0 | 68 | * Create a remote (i.e., out-of-process) frame loader attached to the given |
michael@0 | 69 | * tab parent. |
michael@0 | 70 | * |
michael@0 | 71 | * It is an error to call this method if we already have a frame loader. |
michael@0 | 72 | */ |
michael@0 | 73 | void createRemoteFrameLoader(in nsITabParent aTabParent); |
michael@0 | 74 | }; |