summaryrefslogtreecommitdiffstats
path: root/apps/prefs.cc
diff options
context:
space:
mode:
authortapted@chromium.org <tapted@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-25 00:23:34 +0000
committertapted@chromium.org <tapted@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-25 00:23:34 +0000
commitc1dbcb178ba806f1c7b7e26e4e14deb85cb9b720 (patch)
tree0b1ceb20c77cfd9b02a364e3cbc02ed41f017504 /apps/prefs.cc
parent0700471c72bca247109af0165d09173ce9c107c8 (diff)
downloadchromium_src-c1dbcb178ba806f1c7b7e26e4e14deb85cb9b720.zip
chromium_src-c1dbcb178ba806f1c7b7e26e4e14deb85cb9b720.tar.gz
chromium_src-c1dbcb178ba806f1c7b7e26e4e14deb85cb9b720.tar.bz2
Show an InfoBar when trying to start Packaged Apps from Metro mode.
Platform Apps do not function properly while in Metro mode. This change intercepts platform app launch requests done while the browser is in metro mode, redirecting them to an infobar. If "yes" is chosen, a local pref is stored with the extension id and Profile that tried to launch it, and a relaunch of Chrome in Desktop mode is triggered. Upon restart, apps::AppLaunchOnRestartService is responsible for launching the selected app, and clearing the pref. BUG=153426 TEST=With Chrome configured for Windows 8 mode, try to start a packaged app. This can be done from NTP (if launcher not enabled), or from a taskbar shortcut, a desktop shortcut, or a pinned start page tile. InfoBar should display offering to switch to Desktop mode. If switching, selected packaged app should launch after a brief delay. Review URL: https://chromiumcodereview.appspot.com/12450014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190306 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'apps/prefs.cc')
-rw-r--r--apps/prefs.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/prefs.cc b/apps/prefs.cc
index b883fbb..edaf119 100644
--- a/apps/prefs.cc
+++ b/apps/prefs.cc
@@ -20,6 +20,11 @@ void RegisterPrefs(PrefRegistrySimple* registry) {
// GetIsAppLauncherEnabled().
registry->RegisterBooleanPref(prefs::kAppLauncherIsEnabled,
MaybeIsAppLauncherEnabled());
+
+#if defined(OS_WIN)
+ registry->RegisterStringPref(prefs::kAppLaunchForMetroRestart, "");
+ registry->RegisterStringPref(prefs::kAppLaunchForMetroRestartProfile, "");
+#endif
}
} // namespace apps