Index: win8/metro_driver/chrome_app_view_ash.cc |
diff --git a/win8/metro_driver/chrome_app_view_ash.cc b/win8/metro_driver/chrome_app_view_ash.cc |
index a82ab1f6fe22580e8cd696b97657ae14fb5a9506..981a21c93e28fc5504f462083b89365119ecc7e1 100644 |
--- a/win8/metro_driver/chrome_app_view_ash.cc |
+++ b/win8/metro_driver/chrome_app_view_ash.cc |
@@ -925,12 +925,17 @@ void ChromeAppViewAsh::OnMetroExit(MetroTerminateMethod method) { |
core_window == ::GetForegroundWindow()) { |
DVLOG(1) << "We are in the foreground. Exiting via Alt F4"; |
SendKeySequence(VK_F4, ALT); |
+ if (ui_channel_) |
+ ui_channel_->Close(); |
+ } else { |
+ globals.app_exit->Exit(); |
} |
- } |
- if (ui_channel_) |
- ui_channel_->Close(); |
+ } else { |
+ if (ui_channel_) |
+ ui_channel_->Close(); |
- globals.app_exit->Exit(); |
+ globals.app_exit->Exit(); |
+ } |
} |
void ChromeAppViewAsh::OnInputSourceChanged() { |