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

This commit is contained in:
Justin Lebar 2013-02-14 02:26:43 -05:00
Родитель ca51cd7e87
Коммит e24833e1b4
3 изменённых файлов: 24 добавлений и 0 удалений

Просмотреть файл

@ -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")

Просмотреть файл

@ -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)
{

Просмотреть файл

@ -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.