| OLD | NEW |
| 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 "chrome/browser/hang_monitor/hung_window_detector.h" | 5 #include "chrome/browser/hang_monitor/hung_window_detector.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <atlbase.h> | 8 #include <atlbase.h> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "chrome/browser/hang_monitor/hang_crash_dump_win.h" | 11 #include "chrome/browser/hang_monitor/hang_crash_dump_win.h" |
| 12 #include "content/public/common/result_codes.h" | 12 #include "content/public/common/result_codes.h" |
| 13 | 13 |
| 14 namespace { | |
| 15 | |
| 16 // How long do we wait for the terminated thread or process to die (in ms) | |
| 17 static const int kTerminateTimeout = 2000; | |
| 18 | |
| 19 } // namespace | |
| 20 | |
| 21 const wchar_t HungWindowDetector::kHungChildWindowTimeout[] = | 14 const wchar_t HungWindowDetector::kHungChildWindowTimeout[] = |
| 22 L"Chrome_HungChildWindowTimeout"; | 15 L"Chrome_HungChildWindowTimeout"; |
| 23 | 16 |
| 24 HungWindowDetector::HungWindowDetector(HungWindowNotification* notification) | 17 HungWindowDetector::HungWindowDetector(HungWindowNotification* notification) |
| 25 : notification_(notification), | 18 : notification_(notification), |
| 26 top_level_window_(NULL), | 19 top_level_window_(NULL), |
| 27 message_response_timeout_(0), | 20 message_response_timeout_(0), |
| 28 enumerating_(false) { | 21 enumerating_(false) { |
| 29 DCHECK(NULL != notification_); | 22 DCHECK(NULL != notification_); |
| 30 } | 23 } |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 LPARAM param) { | 152 LPARAM param) { |
| 160 HungWindowDetector* detector_instance = | 153 HungWindowDetector* detector_instance = |
| 161 reinterpret_cast<HungWindowDetector*>(param); | 154 reinterpret_cast<HungWindowDetector*>(param); |
| 162 if (NULL == detector_instance) { | 155 if (NULL == detector_instance) { |
| 163 NOTREACHED(); | 156 NOTREACHED(); |
| 164 return FALSE; | 157 return FALSE; |
| 165 } | 158 } |
| 166 | 159 |
| 167 return detector_instance->CheckChildWindow(child_window); | 160 return detector_instance->CheckChildWindow(child_window); |
| 168 } | 161 } |
| OLD | NEW |