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

Side by Side Diff: win8/metro_driver/chrome_app_view_ash.cc

Issue 584213002: Only do aggressive metro viewer termination in tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add wfso Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « base/test/test_process_killer_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "win8/metro_driver/stdafx.h" 5 #include "win8/metro_driver/stdafx.h"
6 #include "win8/metro_driver/chrome_app_view_ash.h" 6 #include "win8/metro_driver/chrome_app_view_ash.h"
7 7
8 #include <corewindow.h> 8 #include <corewindow.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #include <windows.foundation.h> 10 #include <windows.foundation.h>
(...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 } 963 }
964 } else { 964 } else {
965 if (ui_channel_) 965 if (ui_channel_)
966 ui_channel_->Close(); 966 ui_channel_->Close();
967 967
968 HWND core_window = core_window_hwnd(); 968 HWND core_window = core_window_hwnd();
969 ::PostMessage(core_window, WM_CLOSE, 0, 0); 969 ::PostMessage(core_window, WM_CLOSE, 0, 0);
970 970
971 globals.app_exit->Exit(); 971 globals.app_exit->Exit();
972 } 972 }
973
974 // Try really hard, see http://crbug.com/411147 for details.
975 ::TerminateProcess(::GetCurrentProcess(), 0);
976 } 973 }
977 974
978 void ChromeAppViewAsh::OnInputSourceChanged() { 975 void ChromeAppViewAsh::OnInputSourceChanged() {
979 if (!input_source_) 976 if (!input_source_)
980 return; 977 return;
981 978
982 LANGID langid = 0; 979 LANGID langid = 0;
983 bool is_ime = false; 980 bool is_ime = false;
984 if (!input_source_->GetActiveSource(&langid, &is_ime)) { 981 if (!input_source_->GetActiveSource(&langid, &is_ime)) {
985 LOG(ERROR) << "GetActiveSource failed"; 982 LOG(ERROR) << "GetActiveSource failed";
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
1403 mswr::ComPtr<winapp::Core::ICoreApplicationExit> app_exit; 1400 mswr::ComPtr<winapp::Core::ICoreApplicationExit> app_exit;
1404 CheckHR(core_app.As(&app_exit)); 1401 CheckHR(core_app.As(&app_exit));
1405 globals.app_exit = app_exit.Detach(); 1402 globals.app_exit = app_exit.Detach();
1406 } 1403 }
1407 1404
1408 IFACEMETHODIMP 1405 IFACEMETHODIMP
1409 ChromeAppViewFactory::CreateView(winapp::Core::IFrameworkView** view) { 1406 ChromeAppViewFactory::CreateView(winapp::Core::IFrameworkView** view) {
1410 *view = mswr::Make<ChromeAppViewAsh>().Detach(); 1407 *view = mswr::Make<ChromeAppViewAsh>().Detach();
1411 return (*view) ? S_OK : E_OUTOFMEMORY; 1408 return (*view) ? S_OK : E_OUTOFMEMORY;
1412 } 1409 }
OLDNEW
« no previous file with comments | « base/test/test_process_killer_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698