Bug 836654 - Part 5: Add nsIMozBrowserFrame::isExpectingSystemMessage. r=bz

This commit is contained in:
Justin Lebar 2013-02-14 02:26:43 -05:00
parent 0829bd3cc0
commit edfe849009
3 changed files with 24 additions and 0 deletions

View File

@ -342,6 +342,7 @@ GK_ATOM(events, "events")
GK_ATOM(excludeResultPrefixes, "exclude-result-prefixes")
GK_ATOM(excludes, "excludes")
GK_ATOM(expr, "expr")
GK_ATOM(expectingSystemMessage, "expecting-system-message")
GK_ATOM(extends, "extends")
GK_ATOM(extensionElementPrefixes, "extension-element-prefixes")
GK_ATOM(face, "face")

View File

@ -321,6 +321,19 @@ nsGenericHTMLFrameElement::GetReallyIsApp(bool *aOut)
return NS_OK;
}
/* [infallible] */ NS_IMETHODIMP
nsGenericHTMLFrameElement::GetIsExpectingSystemMessage(bool *aOut)
{
*aOut = false;
if (!nsIMozBrowserFrame::GetReallyIsApp()) {
return NS_OK;
}
*aOut = HasAttr(kNameSpaceID_None, nsGkAtoms::expectingSystemMessage);
return NS_OK;
}
NS_IMETHODIMP
nsGenericHTMLFrameElement::GetAppManifestURL(nsAString& aOut)
{

View File

@ -30,6 +30,16 @@ interface nsIMozBrowserFrame : nsIDOMMozBrowserFrame
*/
[infallible] readonly attribute boolean reallyIsApp;
/**
* This corresponds to the expecting-system-message attribute, which tells us
* whether we should expect that this frame will receive a system message once
* it starts up.
*
* It's the embedder's job to set this attribute on a frame. Its presence
* might cause us to increase the priority of the frame's process.
*/
[infallible] readonly attribute boolean isExpectingSystemMessage;
/**
* Gets this frame's app manifest URL, if the frame really is an app frame.
* Otherwise, returns the empty string.