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

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

Issue 584513004: Forcibly terminate the metro viewer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert the rest 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 | « no previous file | 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 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 } 969 }
970 } else { 970 } else {
971 if (ui_channel_) 971 if (ui_channel_)
972 ui_channel_->Close(); 972 ui_channel_->Close();
973 973
974 HWND core_window = core_window_hwnd(); 974 HWND core_window = core_window_hwnd();
975 ::PostMessage(core_window, WM_CLOSE, 0, 0); 975 ::PostMessage(core_window, WM_CLOSE, 0, 0);
976 976
977 globals.app_exit->Exit(); 977 globals.app_exit->Exit();
978 } 978 }
979
980 // Try really hard, see http://crbug.com/411147 for details.
981 ::TerminateProcess(::GetCurrentProcess(), 0);
979 } 982 }
980 983
981 void ChromeAppViewAsh::OnInputSourceChanged() { 984 void ChromeAppViewAsh::OnInputSourceChanged() {
982 if (!input_source_) 985 if (!input_source_)
983 return; 986 return;
984 987
985 LANGID langid = 0; 988 LANGID langid = 0;
986 bool is_ime = false; 989 bool is_ime = false;
987 if (!input_source_->GetActiveSource(&langid, &is_ime)) { 990 if (!input_source_->GetActiveSource(&langid, &is_ime)) {
988 LOG(ERROR) << "GetActiveSource failed"; 991 LOG(ERROR) << "GetActiveSource failed";
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
1406 mswr::ComPtr<winapp::Core::ICoreApplicationExit> app_exit; 1409 mswr::ComPtr<winapp::Core::ICoreApplicationExit> app_exit;
1407 CheckHR(core_app.As(&app_exit)); 1410 CheckHR(core_app.As(&app_exit));
1408 globals.app_exit = app_exit.Detach(); 1411 globals.app_exit = app_exit.Detach();
1409 } 1412 }
1410 1413
1411 IFACEMETHODIMP 1414 IFACEMETHODIMP
1412 ChromeAppViewFactory::CreateView(winapp::Core::IFrameworkView** view) { 1415 ChromeAppViewFactory::CreateView(winapp::Core::IFrameworkView** view) {
1413 *view = mswr::Make<ChromeAppViewAsh>().Detach(); 1416 *view = mswr::Make<ChromeAppViewAsh>().Detach();
1414 return (*view) ? S_OK : E_OUTOFMEMORY; 1417 return (*view) ? S_OK : E_OUTOFMEMORY;
1415 } 1418 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698