Bug 950241 - Add update restart flag to metro utils. r=bbondy

This commit is contained in:
Jim Mathies 2014-01-30 13:32:47 -06:00
parent 2d4fb597e8
commit 8621850d11
3 changed files with 26 additions and 1 deletions

View File

@ -12,7 +12,7 @@
* implementation of this interface for non-Windows systems, for testing and
* development purposes only.
*/
[scriptable, uuid(148f57d3-51df-4e5c-a40b-7ae5ee76188e)]
[scriptable, uuid(b6cbef4a-eec1-470b-8e74-9f4120f678c6)]
interface nsIWinMetroUtils : nsISupports
{
/**
@ -33,6 +33,13 @@ interface nsIWinMetroUtils : nsISupports
*/
readonly attribute long previousExecutionState;
/**
* Helper for our restart logic up in the about flyout. We set this
* right before we restart for an update so that MetroAppShell can
* communicate this to the ceh.
*/
attribute boolean updatePending;
/**
* Show the settings flyout
*/

View File

@ -33,6 +33,8 @@ extern ComPtr<FrameworkView> sFrameworkView;
namespace mozilla {
namespace widget {
bool nsWinMetroUtils::sUpdatePending = false;
NS_IMPL_ISUPPORTS1(nsWinMetroUtils, nsIWinMetroUtils)
nsWinMetroUtils::nsWinMetroUtils()
@ -317,5 +319,19 @@ nsWinMetroUtils::SwapMouseButton(bool aValue, bool *aOriginalValue)
return NS_OK;
}
NS_IMETHODIMP
nsWinMetroUtils::GetUpdatePending(bool *aUpdatePending)
{
*aUpdatePending = sUpdatePending;
return NS_OK;
}
NS_IMETHODIMP
nsWinMetroUtils::SetUpdatePending(bool aUpdatePending)
{
sUpdatePending = aUpdatePending;
return NS_OK;
}
} // widget
} // mozilla

View File

@ -19,6 +19,8 @@ public:
nsWinMetroUtils();
virtual ~nsWinMetroUtils();
static bool sUpdatePending;
};
} // widget