OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/common/result_codes.h" | 11 #include "content/common/result_codes.h" |
12 | 12 |
13 // How long do we wait for the terminated thread or process to die (in ms) | 13 // How long do we wait for the terminated thread or process to die (in ms) |
14 static const int kTerminateTimeout = 2000; | 14 static const int kTerminateTimeout = 2000; |
15 | 15 |
16 const wchar_t HungWindowDetector::kHungChildWindowTimeout[] = | 16 const wchar_t HungWindowDetector::kHungChildWindowTimeout[] = |
17 L"Chrome_HungChildWindowTimeout"; | 17 L"Chrome_HungChildWindowTimeout"; |
18 | 18 |
19 HungWindowDetector::HungWindowDetector(HungWindowNotification* notification) | 19 HungWindowDetector::HungWindowDetector(HungWindowNotification* notification) |
20 : notification_(notification), | 20 : notification_(notification), |
21 top_level_window_(NULL), | 21 top_level_window_(NULL), |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 LPARAM param) { | 168 LPARAM param) { |
169 HungWindowDetector* detector_instance = | 169 HungWindowDetector* detector_instance = |
170 reinterpret_cast<HungWindowDetector*>(param); | 170 reinterpret_cast<HungWindowDetector*>(param); |
171 if (NULL == detector_instance) { | 171 if (NULL == detector_instance) { |
172 NOTREACHED(); | 172 NOTREACHED(); |
173 return FALSE; | 173 return FALSE; |
174 } | 174 } |
175 | 175 |
176 return detector_instance->CheckChildWindow(child_window); | 176 return detector_instance->CheckChildWindow(child_window); |
177 } | 177 } |
OLD | NEW |