Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Unified Diff: win8/metro_driver/chrome_app_view_ash.cc

Issue 235933004: 3rd part of porting Chrome Ash to Windows 7 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ash_unittests fixes Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/win/dpi.cc ('k') | win8/metro_driver/metro_driver_win7.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « ui/gfx/win/dpi.cc ('k') | win8/metro_driver/metro_driver_win7.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698