OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_HANG_MONITOR_HUNG_WINDOW_DETECTOR_H__ | 5 #ifndef CHROME_BROWSER_HANG_MONITOR_HUNG_WINDOW_DETECTOR_H__ |
6 #define CHROME_BROWSER_HANG_MONITOR_HUNG_WINDOW_DETECTOR_H__ | 6 #define CHROME_BROWSER_HANG_MONITOR_HUNG_WINDOW_DETECTOR_H__ |
7 | 7 |
| 8 #include "base/macros.h" |
8 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
9 #include "chrome/common/worker_thread_ticker.h" | 10 #include "chrome/common/worker_thread_ticker.h" |
10 | 11 |
11 // This class provides the following functionality: | 12 // This class provides the following functionality: |
12 // Given a top-level window handle, it enumerates all descendant windows | 13 // Given a top-level window handle, it enumerates all descendant windows |
13 // of that window and, on finding a window that belongs to a different | 14 // of that window and, on finding a window that belongs to a different |
14 // thread from that of the top-level window, it tests to see if that window | 15 // thread from that of the top-level window, it tests to see if that window |
15 // is responding to messages. It does this test by first calling the | 16 // is responding to messages. It does this test by first calling the |
16 // IsHungAppWindow API and, additionally (since the IsHungAppWindow API | 17 // IsHungAppWindow API and, additionally (since the IsHungAppWindow API |
17 // does not deal correctly with suspended threads), send a dummy message | 18 // does not deal correctly with suspended threads), send a dummy message |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 int message_response_timeout_; | 82 int message_response_timeout_; |
82 base::Lock hang_detection_lock_; | 83 base::Lock hang_detection_lock_; |
83 // Indicates if this object is currently enumerating hung windows | 84 // Indicates if this object is currently enumerating hung windows |
84 bool enumerating_; | 85 bool enumerating_; |
85 | 86 |
86 DISALLOW_COPY_AND_ASSIGN(HungWindowDetector); | 87 DISALLOW_COPY_AND_ASSIGN(HungWindowDetector); |
87 }; | 88 }; |
88 | 89 |
89 | 90 |
90 #endif // CHROME_BROWSER_HANG_MONITOR_HUNG_WINDOW_DETECTOR_H__ | 91 #endif // CHROME_BROWSER_HANG_MONITOR_HUNG_WINDOW_DETECTOR_H__ |
OLD | NEW |