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" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 // value specified by the message_response_timeout_ member. It is | 96 // value specified by the message_response_timeout_ member. It is |
97 // tracked by a property on the child window. | 97 // tracked by a property on the child window. |
98 #pragma warning(disable:4311) | 98 #pragma warning(disable:4311) |
99 int child_window_message_timeout = | 99 int child_window_message_timeout = |
100 reinterpret_cast<int>(GetProp(child_window, kHungChildWindowTimeout)); | 100 reinterpret_cast<int>(GetProp(child_window, kHungChildWindowTimeout)); |
101 #pragma warning(default:4311) | 101 #pragma warning(default:4311) |
102 if (!child_window_message_timeout) { | 102 if (!child_window_message_timeout) { |
103 child_window_message_timeout = message_response_timeout_; | 103 child_window_message_timeout = message_response_timeout_; |
104 } | 104 } |
105 | 105 |
106 DWORD result = 0; | 106 DWORD_PTR result = 0; |
107 if (0 == SendMessageTimeout(child_window, | 107 if (0 == SendMessageTimeout(child_window, |
108 WM_NULL, | 108 WM_NULL, |
109 0, | 109 0, |
110 0, | 110 0, |
111 SMTO_BLOCK, | 111 SMTO_BLOCK, |
112 child_window_message_timeout, | 112 child_window_message_timeout, |
113 &result)) { | 113 &result)) { |
114 HungWindowNotification::ActionOnHungWindow action = | 114 HungWindowNotification::ActionOnHungWindow action = |
115 HungWindowNotification::HUNG_WINDOW_IGNORE; | 115 HungWindowNotification::HUNG_WINDOW_IGNORE; |
116 #pragma warning(disable:4312) | 116 #pragma warning(disable:4312) |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 LPARAM param) { | 159 LPARAM param) { |
160 HungWindowDetector* detector_instance = | 160 HungWindowDetector* detector_instance = |
161 reinterpret_cast<HungWindowDetector*>(param); | 161 reinterpret_cast<HungWindowDetector*>(param); |
162 if (NULL == detector_instance) { | 162 if (NULL == detector_instance) { |
163 NOTREACHED(); | 163 NOTREACHED(); |
164 return FALSE; | 164 return FALSE; |
165 } | 165 } |
166 | 166 |
167 return detector_instance->CheckChildWindow(child_window); | 167 return detector_instance->CheckChildWindow(child_window); |
168 } | 168 } |
OLD | NEW |