summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/chromium_strings.grd4
-rw-r--r--chrome/app/generated_resources.grd8
-rw-r--r--chrome/app/google_chrome_strings.grd4
-rw-r--r--chrome/browser/process_singleton_win.cc45
-rw-r--r--chrome/browser/ui/app_list/app_list_service.cc3
-rw-r--r--chrome/browser/ui/extensions/app_metro_infobar_delegate_win.cc114
-rw-r--r--chrome/browser/ui/extensions/app_metro_infobar_delegate_win.h50
-rw-r--r--chrome/browser/ui/metro_chrome_win.cc56
-rw-r--r--chrome/browser/ui/metro_chrome_win.h19
-rw-r--r--chrome/browser/ui/views/app_list/app_list_controller_win.cc44
-rw-r--r--chrome/chrome_browser_ui.gypi4
-rw-r--r--chrome/common/pref_names.cc4
-rw-r--r--chrome/common/pref_names.h1
13 files changed, 313 insertions, 43 deletions
diff --git a/chrome/app/chromium_strings.grd b/chrome/app/chromium_strings.grd
index 284681d..adc0e4f 100644
--- a/chrome/app/chromium_strings.grd
+++ b/chrome/app/chromium_strings.grd
@@ -235,6 +235,10 @@ be available for now. -->
<message name="IDS_PRODUCT_APP_LAUNCHER_NAME" desc="The Chrome App Launcher application name">
Chromium App Launcher
</message>
+ <message name="IDS_WIN8_INFOBAR_DESKTOP_RESTART_TO_LAUNCH_APPS"
+ desc="Infobar message to restart chrome in desktop mode to launch Chrome Apps. Aplies to Windows 8 only">
+ You need to switch Chromium to desktop mode to use the App Launcher.
+ </message>
<message name="IDS_PRODUCT_BINARIES_NAME" desc="The Chrome Binaries application name">
Chromium Binaries
</message>
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 4e9f6e4..17cf80b 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -15130,6 +15130,14 @@ Some features may be unavailable. Please check that the profile exists and you
desc="Text for the menu item to restart chrome in metro. Aplies to Windows 8 only">
Relaunch Chrome in Windows 8 mode
</message>
+ <message name="IDS_WIN8_INFOBAR_DESKTOP_RESTART_TO_LAUNCH_APPS_YES_BUTTON"
+ desc="Infobar button 'yes' text to confirm that the user does wish to switch to desktop mode to use Chrome Apps">
+ Yes, go ahead
+ </message>
+ <message name="IDS_WIN8_INFOBAR_DESKTOP_RESTART_TO_LAUNCH_APPS_NO_BUTTON"
+ desc="Infobar button 'no' text to cancel prompt to relaunch in deskop mode to use Chrome Apps">
+ No, stay in Windows 8 mode
+ </message>
<!-- Media Galleries. -->
<message name="IDS_MEDIA_GALLERIES_DIALOG_HEADER" desc="Header for media gallery permissions dialog.">
diff --git a/chrome/app/google_chrome_strings.grd b/chrome/app/google_chrome_strings.grd
index 47ec8e9f..620c466 100644
--- a/chrome/app/google_chrome_strings.grd
+++ b/chrome/app/google_chrome_strings.grd
@@ -158,6 +158,10 @@ Chrome supports. -->
<message name="IDS_PRODUCT_APP_LAUNCHER_NAME" desc="The Chrome App Launcher application name">
Google Chrome App Launcher
</message>
+ <message name="IDS_WIN8_INFOBAR_DESKTOP_RESTART_TO_LAUNCH_APPS"
+ desc="Infobar message to restart chrome in desktop mode to launch Chrome Apps. Aplies to Windows 8 only">
+ You need to switch Chrome to desktop mode to use the App Launcher.
+ </message>
<message name="IDS_PRODUCT_BINARIES_NAME" desc="The Chrome Binaries application name">
Google Chrome Binaries
</message>
diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc
index 5f83a22..5ad4c0f 100644
--- a/chrome/browser/process_singleton_win.cc
+++ b/chrome/browser/process_singleton_win.cc
@@ -5,7 +5,6 @@
#include "chrome/browser/process_singleton.h"
#include <shellapi.h>
-#include <shobjidl.h>
#include "base/base_paths.h"
#include "base/command_line.h"
@@ -16,22 +15,18 @@
#include "base/utf_string_conversions.h"
#include "base/win/metro.h"
#include "base/win/registry.h"
-#include "base/win/scoped_com_initializer.h"
-#include "base/win/scoped_comptr.h"
#include "base/win/scoped_handle.h"
#include "base/win/win_util.h"
#include "base/win/windows_version.h"
#include "base/win/wrapped_window_proc.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/shell_integration.h"
+#include "chrome/browser/ui/metro_chrome_win.h"
#include "chrome/browser/ui/simple_message_box.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_paths_internal.h"
#include "chrome/common/chrome_switches.h"
-#include "chrome/installer/util/browser_distribution.h"
-#include "chrome/installer/util/install_util.h"
-#include "chrome/installer/util/shell_util.h"
#include "chrome/installer/util/wmi.h"
#include "content/public/common/result_codes.h"
#include "grit/chromium_strings.h"
@@ -174,40 +169,6 @@ bool ParseCommandLine(const COPYDATASTRUCT* cds,
return false;
}
-bool ActivateMetroChrome() {
- base::FilePath chrome_exe;
- if (!PathService::Get(base::FILE_EXE, &chrome_exe)) {
- NOTREACHED() << "Failed to get chrome exe path";
- return false;
- }
- string16 app_id = ShellUtil::GetBrowserModelId(
- BrowserDistribution::GetDistribution(),
- InstallUtil::IsPerUserInstall(chrome_exe.value().c_str()));
- if (app_id.empty()) {
- NOTREACHED() << "Failed to get chrome app user model id.";
- return false;
- }
-
- base::win::ScopedComPtr<IApplicationActivationManager> activation_manager;
- HRESULT hr = activation_manager.CreateInstance(
- CLSID_ApplicationActivationManager);
- if (!activation_manager) {
- NOTREACHED() << "Failed to cocreate activation manager. Error: " << hr;
- return false;
- }
-
- unsigned long pid = 0;
- hr = activation_manager->ActivateApplication(app_id.c_str(),
- L"open",
- AO_NONE,
- &pid);
- if (FAILED(hr)) {
- NOTREACHED() << "Failed to activate metro chrome. Error: " << hr;
- return false;
- }
- return true;
-}
-
// Returns true if Chrome needs to be relaunched into Windows 8 immersive mode.
// Following conditions apply:-
// 1. Windows 8 or greater.
@@ -369,7 +330,7 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() {
process_id, PROCESS_QUERY_INFORMATION,
process_handle.Receive()) &&
base::win::IsProcessImmersive(process_handle.Get())) {
- ActivateMetroChrome();
+ chrome::ActivateMetroChrome();
}
// Allow the current running browser window making itself the foreground
@@ -494,7 +455,7 @@ bool ProcessSingleton::Create(
// Metro mode: activate and rendez-vous with the activated process.
metro_activation_event.Set(
CreateEvent(NULL, TRUE, FALSE, kMetroActivationEventName));
- if (!ActivateMetroChrome()) {
+ if (!chrome::ActivateMetroChrome()) {
// Failed to launch immersive Chrome, default to launching on Desktop.
LOG(ERROR) << "Failed to launch immersive chrome";
metro_activation_event.Close();
diff --git a/chrome/browser/ui/app_list/app_list_service.cc b/chrome/browser/ui/app_list/app_list_service.cc
index 08abfe1..75da461 100644
--- a/chrome/browser/ui/app_list/app_list_service.cc
+++ b/chrome/browser/ui/app_list/app_list_service.cc
@@ -14,6 +14,9 @@
// static
void AppListService::RegisterPrefs(PrefRegistrySimple* registry) {
registry->RegisterStringPref(prefs::kAppListProfile, "");
+#if defined(OS_WIN)
+ registry->RegisterBooleanPref(prefs::kRestartWithAppList, false);
+#endif
}
void AppListService::Init(Profile* initial_profile) {}
diff --git a/chrome/browser/ui/extensions/app_metro_infobar_delegate_win.cc b/chrome/browser/ui/extensions/app_metro_infobar_delegate_win.cc
new file mode 100644
index 0000000..42ae188
--- /dev/null
+++ b/chrome/browser/ui/extensions/app_metro_infobar_delegate_win.cc
@@ -0,0 +1,114 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/extensions/app_metro_infobar_delegate_win.h"
+
+#include "base/bind_helpers.h"
+#include "base/message_loop.h"
+#include "base/prefs/pref_service.h"
+#include "chrome/browser/browser_process.h"
+#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/browser_finder.h"
+#include "chrome/browser/ui/browser_window.h"
+#include "chrome/browser/ui/host_desktop.h"
+#include "chrome/browser/ui/metro_chrome_win.h"
+#include "chrome/common/pref_names.h"
+#include "content/public/browser/web_contents.h"
+#include "content/public/common/url_constants.h"
+#include "grit/generated_resources.h"
+#include "grit/google_chrome_strings.h"
+#include "grit/theme_resources.h"
+#include "ui/base/l10n/l10n_util.h"
+#include "ui/base/resource/resource_bundle.h"
+#include "win8/util/win8_util.h"
+
+namespace chrome {
+
+void AppMetroInfoBarDelegateWin::CreateAndActivateMetro(Profile* profile) {
+ // Chrome should never get here via the Ash desktop, so only look for browsers
+ // on the native desktop.
+ CHECK(win8::IsSingleWindowMetroMode());
+ Browser* browser = FindOrCreateTabbedBrowser(
+ profile, chrome::HOST_DESKTOP_TYPE_NATIVE);
+
+ // Create a new tab at about:blank, and add the infobar.
+ content::OpenURLParams params(
+ GURL(chrome::kAboutBlankURL),
+ content::Referrer(),
+ NEW_FOREGROUND_TAB,
+ content::PAGE_TRANSITION_LINK, false);
+ content::WebContents* web_contents = browser->OpenURL(params);
+ InfoBarService* info_bar_service =
+ InfoBarService::FromWebContents(web_contents);
+ info_bar_service->AddInfoBar(scoped_ptr<InfoBarDelegate>(
+ new AppMetroInfoBarDelegateWin(info_bar_service)));
+
+ // Use PostTask because we can get here in a COM SendMessage, and
+ // ActivateApplication can not be sent nested (returns error
+ // RPC_E_CANTCALLOUT_ININPUTSYNCCALL).
+ MessageLoop::current()->PostTask(
+ FROM_HERE,
+ base::Bind(base::IgnoreResult(chrome::ActivateMetroChrome)));
+}
+
+AppMetroInfoBarDelegateWin::AppMetroInfoBarDelegateWin(
+ InfoBarService* info_bar_service)
+ : ConfirmInfoBarDelegate(info_bar_service) {
+}
+
+AppMetroInfoBarDelegateWin::~AppMetroInfoBarDelegateWin() {}
+
+gfx::Image* AppMetroInfoBarDelegateWin::GetIcon() const {
+ return &ResourceBundle::GetSharedInstance().GetNativeImageNamed(IDR_APP_LIST);
+}
+
+string16 AppMetroInfoBarDelegateWin::GetMessageText() const {
+ return l10n_util::GetStringUTF16(
+ IDS_WIN8_INFOBAR_DESKTOP_RESTART_TO_LAUNCH_APPS);
+}
+
+int AppMetroInfoBarDelegateWin::GetButtons() const {
+ return BUTTON_OK | BUTTON_CANCEL;
+}
+
+string16 AppMetroInfoBarDelegateWin::GetButtonLabel(
+ InfoBarButton button) const {
+ if (button == BUTTON_CANCEL) {
+ return l10n_util::GetStringUTF16(
+ IDS_WIN8_INFOBAR_DESKTOP_RESTART_TO_LAUNCH_APPS_NO_BUTTON);
+ }
+
+ return l10n_util::GetStringUTF16(
+ IDS_WIN8_INFOBAR_DESKTOP_RESTART_TO_LAUNCH_APPS_YES_BUTTON);
+}
+
+bool AppMetroInfoBarDelegateWin::Accept() {
+ owner()->GetWebContents()->Close();
+ PrefService* prefs = g_browser_process->local_state();
+ prefs->SetBoolean(prefs::kRestartWithAppList, true);
+ chrome::AttemptRestartWithModeSwitch();
+ return false;
+}
+
+bool AppMetroInfoBarDelegateWin::Cancel() {
+ owner()->GetWebContents()->Close();
+ return false;
+}
+
+string16 AppMetroInfoBarDelegateWin::GetLinkText() const {
+ return l10n_util::GetStringUTF16(IDS_LEARN_MORE);
+}
+
+bool AppMetroInfoBarDelegateWin::LinkClicked(
+ WindowOpenDisposition disposition) {
+ content::OpenURLParams params(
+ GURL("https://support.google.com/chrome/?p=ib_redirect_to_desktop"),
+ content::Referrer(),
+ (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
+ content::PAGE_TRANSITION_LINK, false);
+ owner()->GetWebContents()->OpenURL(params);
+ return false;
+}
+
+} // namespace chrome
diff --git a/chrome/browser/ui/extensions/app_metro_infobar_delegate_win.h b/chrome/browser/ui/extensions/app_metro_infobar_delegate_win.h
new file mode 100644
index 0000000..64451fa
--- /dev/null
+++ b/chrome/browser/ui/extensions/app_metro_infobar_delegate_win.h
@@ -0,0 +1,50 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_EXTENSIONS_APP_METRO_INFOBAR_DELEGATE_WIN_H_
+#define CHROME_BROWSER_UI_EXTENSIONS_APP_METRO_INFOBAR_DELEGATE_WIN_H_
+
+#include "base/string16.h"
+#include "chrome/browser/api/infobars/confirm_infobar_delegate.h"
+#include "chrome/browser/api/infobars/infobar_service.h"
+#include "ui/base/window_open_disposition.h"
+
+class Profile;
+
+namespace gfx {
+class Image;
+}
+
+namespace chrome {
+
+// This infobar operates by opening a new tab on about:blank, showing an
+// infobar offering to relaunch the browser in metro mode, and then relaunching
+// in Desktop mode if confirmed.
+class AppMetroInfoBarDelegateWin : public ConfirmInfoBarDelegate {
+ public:
+ // Creates an instance of the app metro infobar delegate, adds it to
+ // |infobar_service|, and then activates metro mode. This CHECK()s to ensure
+ // that it is only called while running in desktop mode.
+ static void CreateAndActivateMetro(Profile* profile);
+
+ private:
+ explicit AppMetroInfoBarDelegateWin(InfoBarService* infobar_service);
+ virtual ~AppMetroInfoBarDelegateWin();
+
+ // ConfirmInfoBarDelegate overrides:
+ virtual gfx::Image* GetIcon() const OVERRIDE;
+ virtual string16 GetMessageText() const OVERRIDE;
+ virtual int GetButtons() const OVERRIDE;
+ virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE;
+ virtual bool Accept() OVERRIDE;
+ virtual bool Cancel() OVERRIDE;
+ virtual string16 GetLinkText() const OVERRIDE;
+ virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE;
+
+ DISALLOW_COPY_AND_ASSIGN(AppMetroInfoBarDelegateWin);
+};
+
+#endif // CHROME_BROWSER_UI_EXTENSIONS_APP_METRO_INFOBAR_DELEGATE_WIN_H_
+
+} // namespace chrome
diff --git a/chrome/browser/ui/metro_chrome_win.cc b/chrome/browser/ui/metro_chrome_win.cc
new file mode 100644
index 0000000..9fd80cff
--- /dev/null
+++ b/chrome/browser/ui/metro_chrome_win.cc
@@ -0,0 +1,56 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/metro_chrome_win.h"
+
+#include <windows.h>
+#include <shobjidl.h>
+
+#include "base/files/file_path.h"
+#include "base/path_service.h"
+#include "base/win/scoped_com_initializer.h"
+#include "base/win/scoped_comptr.h"
+#include "chrome/installer/util/browser_distribution.h"
+#include "chrome/installer/util/install_util.h"
+#include "chrome/installer/util/shell_util.h"
+
+namespace chrome {
+
+bool ActivateMetroChrome() {
+ base::FilePath chrome_exe;
+ if (!PathService::Get(base::FILE_EXE, &chrome_exe)) {
+ NOTREACHED() << "Failed to get chrome exe path";
+ return false;
+ }
+
+ string16 app_id = ShellUtil::GetBrowserModelId(
+ BrowserDistribution::GetDistribution(),
+ InstallUtil::IsPerUserInstall(chrome_exe.value().c_str()));
+ if (app_id.empty()) {
+ NOTREACHED() << "Failed to get chrome app user model id.";
+ return false;
+ }
+
+ base::win::ScopedComPtr<IApplicationActivationManager> activation_manager;
+ HRESULT hr = activation_manager.CreateInstance(
+ CLSID_ApplicationActivationManager);
+ if (!activation_manager) {
+ NOTREACHED() << "Failed to cocreate activation manager. Error: " << hr;
+ return false;
+ }
+
+ unsigned long pid = 0;
+ hr = activation_manager->ActivateApplication(app_id.c_str(),
+ L"open",
+ AO_NONE,
+ &pid);
+ if (FAILED(hr)) {
+ NOTREACHED() << "Failed to activate metro chrome. Error: " << hr;
+ return false;
+ }
+
+ return true;
+}
+
+} // namespace chrome
diff --git a/chrome/browser/ui/metro_chrome_win.h b/chrome/browser/ui/metro_chrome_win.h
new file mode 100644
index 0000000..92ea699
--- /dev/null
+++ b/chrome/browser/ui/metro_chrome_win.h
@@ -0,0 +1,19 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_METRO_CHROME_WIN_H_
+#define CHROME_BROWSER_UI_METRO_CHROME_WIN_H_
+
+namespace chrome {
+
+// Using IApplicationActivationManager::ActivateApplication, activate the
+// Chrome window running in Metro mode. Returns true if the activation was
+// successful. Note that this can not be called nested in another COM
+// SendMessage (results in error RPC_E_CANTCALLOUT_ININPUTSYNCCALL), so use
+// PostTask to handle that case.
+bool ActivateMetroChrome();
+
+} // namespace chrome
+
+#endif // CHROME_BROWSER_UI_METRO_CHROME_WIN_H_
diff --git a/chrome/browser/ui/views/app_list/app_list_controller_win.cc b/chrome/browser/ui/views/app_list/app_list_controller_win.cc
index b016551..5381291 100644
--- a/chrome/browser/ui/views/app_list/app_list_controller_win.cc
+++ b/chrome/browser/ui/views/app_list/app_list_controller_win.cc
@@ -29,6 +29,7 @@
#include "chrome/browser/ui/app_list/app_list_service.h"
#include "chrome/browser/ui/app_list/app_list_service_win.h"
#include "chrome/browser/ui/app_list/app_list_view_delegate.h"
+#include "chrome/browser/ui/extensions/app_metro_infobar_delegate_win.h"
#include "chrome/browser/ui/extensions/application_launch.h"
#include "chrome/browser/ui/views/browser_dialogs.h"
#include "chrome/common/chrome_constants.h"
@@ -51,6 +52,7 @@
#include "ui/gfx/screen.h"
#include "ui/views/bubble/bubble_border.h"
#include "ui/views/widget/widget.h"
+#include "win8/util/win8_util.h"
#if defined(USE_ASH)
#include "ash/shell.h"
@@ -156,6 +158,7 @@ class AppListController : public AppListService {
void AppListClosing();
void AppListActivationChanged(bool active);
+ void ShowAppListDuringModeSwitch(Profile* profile);
app_list::AppListView* GetView() { return current_view_; }
@@ -246,6 +249,11 @@ class AppListController : public AppListService {
// browser process keep-alives active.
bool app_list_is_showing_;
+ // True if we are anticipating that the app list will lose focus, and we want
+ // to take it back. This is used when switching out of Metro mode, and the
+ // browser regains focus after showing the app list.
+ bool regain_first_lost_focus_;
+
// Incremented to indicate that pending profile loads are no longer valid.
int profile_load_sequence_id_;
@@ -433,6 +441,13 @@ void AppListController::DecrementPendingProfileLoads() {
void AppListController::ShowAppList(Profile* profile) {
DCHECK(profile);
+ if (win8::IsSingleWindowMetroMode()) {
+ // This request came from Windows 8 in desktop mode, but chrome is currently
+ // running in Metro mode.
+ chrome::AppMetroInfoBarDelegateWin::CreateAndActivateMetro(profile);
+ return;
+ }
+
// Invalidate any pending profile path loads.
profile_load_sequence_id_++;
@@ -469,6 +484,11 @@ void AppListController::InitView(Profile* profile) {
PopulateViewFromProfile(profile);
}
+void AppListController::ShowAppListDuringModeSwitch(Profile* profile) {
+ regain_first_lost_focus_ = true;
+ ShowAppList(profile);
+}
+
void AppListController::PopulateViewFromProfile(Profile* profile) {
#if !defined(USE_AURA)
if (profile == profile_)
@@ -716,6 +736,12 @@ void AppListController::CheckTaskbarOrViewHasFocus() {
focused_hwnd = GetParent(focused_hwnd);
}
+ if (regain_first_lost_focus_) {
+ regain_first_lost_focus_ = false;
+ current_view_->GetWidget()->Activate();
+ return;
+ }
+
// If we get here, the focused window is not the taskbar, it's context menu,
// or the app list, so close the app list.
DismissAppList();
@@ -775,7 +801,10 @@ void CheckAppListTaskbarShortcutOnFileThread(
base::win::CreateOrUpdateShortcutLink(shortcut_path, shortcut_properties,
base::win::SHORTCUT_CREATE_ALWAYS);
- base::win::TaskbarPinShortcutLink(shortcut_path.value().c_str());
+
+ if (!base::win::TaskbarPinShortcutLink(shortcut_path.value().c_str()))
+ LOG(WARNING) << "Failed to pin AppList using " << shortcut_path.value();
+
return;
}
@@ -792,6 +821,19 @@ void InitView(Profile* profile) {
}
void AppListController::Init(Profile* initial_profile) {
+ // In non-Ash metro mode, we can not show the app list for this process, so do
+ // not bother performing Init tasks.
+ if (win8::IsSingleWindowMetroMode())
+ return;
+
+ PrefService* prefs = g_browser_process->local_state();
+ if (prefs->HasPrefPath(prefs::kRestartWithAppList) &&
+ prefs->GetBoolean(prefs::kRestartWithAppList)) {
+ prefs->SetBoolean(prefs::kRestartWithAppList, false);
+ AppListController::GetInstance()->
+ ShowAppListDuringModeSwitch(initial_profile);
+ }
+
// Check that the app list shortcut matches the flag kShowAppListShortcut.
// This will either create or delete a shortcut file in the user data
// directory.
diff --git a/chrome/chrome_browser_ui.gypi b/chrome/chrome_browser_ui.gypi
index f082622..3f57152 100644
--- a/chrome/chrome_browser_ui.gypi
+++ b/chrome/chrome_browser_ui.gypi
@@ -854,6 +854,8 @@
'browser/ui/crypto_module_password_dialog.h',
'browser/ui/crypto_module_password_dialog_nss.cc',
'browser/ui/crypto_module_password_dialog_openssl.cc',
+ 'browser/ui/extensions/app_metro_infobar_delegate_win.cc',
+ 'browser/ui/extensions/app_metro_infobar_delegate_win.h',
'browser/ui/extensions/application_launch.cc',
'browser/ui/extensions/application_launch.h',
'browser/ui/extensions/extension_install_ui_default.cc',
@@ -1168,6 +1170,8 @@
'browser/ui/login/login_prompt.h',
'browser/ui/media_stream_infobar_delegate.h',
'browser/ui/media_stream_infobar_delegate.cc',
+ 'browser/ui/metro_chrome_win.cc',
+ 'browser/ui/metro_chrome_win.h',
'browser/ui/metro_pin_tab_helper_win.cc',
'browser/ui/metro_pin_tab_helper_win.h',
'browser/ui/native_web_contents_modal_dialog.h',
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
index 89ce860..37c8a55 100644
--- a/chrome/common/pref_names.cc
+++ b/chrome/common/pref_names.cc
@@ -1569,6 +1569,10 @@ const char kWasRestarted[] = "was.restarted";
#if defined(OS_WIN)
// On Windows 8 chrome can restart in desktop or in metro mode.
const char kRestartSwitchMode[] = "restart.switch_mode";
+
+// Whether to show the app list on a browser relaunch. Used when switching out
+// of metro mode after a user gesture requests showing the app list.
+const char kRestartWithAppList[] = "app_list.show_on_relaunch";
#endif
// Number of keywords.
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
index 1c174f4..2503471 100644
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -548,6 +548,7 @@ extern const char kRestartLastSessionOnShutdown[];
extern const char kWasRestarted[];
#if defined(OS_WIN)
extern const char kRestartSwitchMode[];
+extern const char kRestartWithAppList[];
#endif
extern const char kNumKeywords[];