| 1186 | } |
| 1187 | |
| 1188 | void IECommandExecutor::CreateDelayPostMessageThread(const DWORD delay_time, |
| 1189 | const HWND window_handle, |
| 1190 | const UINT message_to_post) { |
| 1191 | DelayPostMessageThreadContext* context = new DelayPostMessageThreadContext; |
| 1192 | context->delay = delay_time; |
| 1193 | context->window_handle = window_handle; |
| 1194 | context->msg = message_to_post; |
| 1195 | unsigned int thread_id = 0; |
| 1196 | HANDLE thread_handle = reinterpret_cast<HANDLE>(_beginthreadex(NULL, |
| 1197 | 0, |
| 1198 | &IECommandExecutor::DelayPostMessageThreadProc, |
| 1199 | reinterpret_cast<void*>(context), |
| 1200 | 0, |
| 1201 | &thread_id)); |
| 1202 | if (thread_handle != NULL) { |
| 1203 | ::CloseHandle(thread_handle); |
| 1204 | } else { |
| 1205 | LOGERR(DEBUG) << "Unable to create waiter thread"; |
| 1206 | } |
| 1207 | } |
| 1208 | |
| 1209 | bool IECommandExecutor::IsAlertActive(BrowserHandle browser, HWND* alert_handle) { |
| 1210 | LOG(TRACE) << "Entering IECommandExecutor::IsAlertActive"; |