[win8] Show a prompt before relaunching Chrome in Windows 8 mode while packaged apps are running.

Introduces ShellWindowRegistry::IsShellWindowRegisteredInAnyProfile to
help determine if packaged apps are currently running. Intercepts the
IDC_WIN8_METRO_RESTART command and shows a modal dialog box if packaged
apps are running to confirm that the user is OK with their packaged
apps closing. Ensures apps with a relaunch handler are not relaunched
when restarting in metro mode.

BUG=222297
TEST=Launch a packaged app in desktop mode and select 'Relaunch Chrome
in Windows 8 mode' from the hotdog menu. A prompt should appear
confirming that your Chrome apps will close if you continue. If no
packaged apps are running, no prompt should appear.

Review URL: https://chromiumcodereview.appspot.com/12566039

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192240 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/apps/app_restore_service.h b/apps/app_restore_service.h
index a308c31..f27c83c 100644
--- a/apps/app_restore_service.h
+++ b/apps/app_restore_service.h
@@ -31,6 +31,10 @@
 class AppRestoreService : public ProfileKeyedService,
                           public content::NotificationObserver {
  public:
+  // Returns true if apps should be restored on the current platform, given
+  // whether this new browser process launched due to a restart.
+  static bool ShouldRestoreApps(bool is_browser_restart);
+
   explicit AppRestoreService(Profile* profile);
 
   // Restart apps that need to be restarted and clear the "running" preference