| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/common/result_codes.h" | 11 #include "content/public/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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 LPARAM param) { | 177 LPARAM param) { |
| 178 HungWindowDetector* detector_instance = | 178 HungWindowDetector* detector_instance = |
| 179 reinterpret_cast<HungWindowDetector*>(param); | 179 reinterpret_cast<HungWindowDetector*>(param); |
| 180 if (NULL == detector_instance) { | 180 if (NULL == detector_instance) { |
| 181 NOTREACHED(); | 181 NOTREACHED(); |
| 182 return FALSE; | 182 return FALSE; |
| 183 } | 183 } |
| 184 | 184 |
| 185 return detector_instance->CheckChildWindow(child_window); | 185 return detector_instance->CheckChildWindow(child_window); |
| 186 } | 186 } |
| OLD | NEW |