From 069fc881828aa504dc01891d2db80fc377d02643 Mon Sep 17 00:00:00 2001 From: ananta Date: Fri, 12 Sep 2014 18:22:12 -0700 Subject: Ensure that on Windows 7, relaunching the browser via chrome://restart or changing about:flags relaunches into Chrome OS mode. There were two problems here. 1. The viewer process on Windows 7 would not die : Fixed by destroying the window when we get a signal from the browser process that the viewer needs to die. 2. Relaunching on Windows 7 would relaunch the existing browser process with the same command line. On Windows 8 relaunch launches back into Windows 8 mode as delegate execute has code to launch back into the previous mode. On Windows 7 we don't have that luxury. The current approach is to detect that we are in Windows 7 in a browser launched to service the viewer process and return that we need to launch into Chrome OS mode. Additionally we set the corresponding pref to ensure that this is honored. BUG=413101 Review URL: https://codereview.chromium.org/568623002 Cr-Commit-Position: refs/heads/master@{#294721} --- win8/metro_driver/chrome_app_view_ash.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'win8') diff --git a/win8/metro_driver/chrome_app_view_ash.cc b/win8/metro_driver/chrome_app_view_ash.cc index 2f615d3..0d1ea8b 100644 --- a/win8/metro_driver/chrome_app_view_ash.cc +++ b/win8/metro_driver/chrome_app_view_ash.cc @@ -971,6 +971,9 @@ void ChromeAppViewAsh::OnMetroExit(MetroTerminateMethod method) { if (ui_channel_) ui_channel_->Close(); + HWND core_window = core_window_hwnd(); + ::PostMessage(core_window, WM_CLOSE, 0, 0); + globals.app_exit->Exit(); } } -- cgit v1.1