| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/browser/message_window.h" | 5 #include "chrome/browser/message_window.h" |
| 6 | 6 |
| 7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/process_util.h" | 9 #include "base/process_util.h" |
| 10 #include "base/win_util.h" | 10 #include "base/win_util.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 std::wstring text = l10n_util::GetString(IDS_BROWSER_HUNGBROWSER_MESSAGE); | 99 std::wstring text = l10n_util::GetString(IDS_BROWSER_HUNGBROWSER_MESSAGE); |
| 100 std::wstring caption = l10n_util::GetString(IDS_PRODUCT_NAME); | 100 std::wstring caption = l10n_util::GetString(IDS_PRODUCT_NAME); |
| 101 if (IDYES != win_util::MessageBox(NULL, text, caption, | 101 if (IDYES != win_util::MessageBox(NULL, text, caption, |
| 102 MB_YESNO | MB_ICONSTOP | MB_TOPMOST)) { | 102 MB_YESNO | MB_ICONSTOP | MB_TOPMOST)) { |
| 103 // The user denied. Quit silently. | 103 // The user denied. Quit silently. |
| 104 return true; | 104 return true; |
| 105 } | 105 } |
| 106 } | 106 } |
| 107 | 107 |
| 108 // Time to take action. Kill the browser process. | 108 // Time to take action. Kill the browser process. |
| 109 base::KillProcess(process_id, ResultCodes::HUNG, true); | 109 base::KillProcessById(process_id, ResultCodes::HUNG, true); |
| 110 remote_window_ = NULL; | 110 remote_window_ = NULL; |
| 111 return false; | 111 return false; |
| 112 } | 112 } |
| 113 | 113 |
| 114 void MessageWindow::Create() { | 114 void MessageWindow::Create() { |
| 115 DCHECK(!window_); | 115 DCHECK(!window_); |
| 116 DCHECK(!remote_window_); | 116 DCHECK(!remote_window_); |
| 117 HINSTANCE hinst = GetModuleHandle(NULL); | 117 HINSTANCE hinst = GetModuleHandle(NULL); |
| 118 | 118 |
| 119 WNDCLASSEX wc = {0}; | 119 WNDCLASSEX wc = {0}; |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 return true; | 278 return true; |
| 279 } | 279 } |
| 280 | 280 |
| 281 protected: | 281 protected: |
| 282 std::vector<uint32> browsers_; | 282 std::vector<uint32> browsers_; |
| 283 }; | 283 }; |
| 284 | 284 |
| 285 ZombieDetector zombie_detector; | 285 ZombieDetector zombie_detector; |
| 286 base::KillProcesses(L"chrome.exe", ResultCodes::HUNG, &zombie_detector); | 286 base::KillProcesses(L"chrome.exe", ResultCodes::HUNG, &zombie_detector); |
| 287 } | 287 } |
| OLD | NEW |