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 8e1f0e64d233d152141f2bf87267b7cdfcecf668..69c4555a57d45bbe8d5c838d332e0114d52a1563 100644 |
--- a/win8/metro_driver/chrome_app_view_ash.cc |
+++ b/win8/metro_driver/chrome_app_view_ash.cc |
@@ -919,16 +919,18 @@ void ChromeAppViewAsh::OnImePopupChanged(ImePopupObserver::EventType event) { |
// window which ensures that the chrome application tile does not show up in |
// the running metro apps list on the top left corner. |
void ChromeAppViewAsh::OnMetroExit(MetroTerminateMethod method) { |
- HWND core_window = core_window_hwnd(); |
- if (method == TERMINATE_USING_KEY_SEQUENCE && core_window != NULL && |
- 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 (base::win::GetVersion() >= base::win::VERSION_WIN8) { |
+ HWND core_window = core_window_hwnd(); |
+ if (method == TERMINATE_USING_KEY_SEQUENCE && core_window != NULL && |
+ core_window == ::GetForegroundWindow()) { |
+ DVLOG(1) << "We are in the foreground. Exiting via Alt F4"; |
+ SendKeySequence(VK_F4, ALT); |
+ } |
} |
+ if (ui_channel_) |
+ ui_channel_->Close(); |
+ |
+ globals.app_exit->Exit(); |
} |
void ChromeAppViewAsh::OnInputSourceChanged() { |