| 207 | } |
| 208 | |
| 209 | HWND HtmlDialog::GetActiveDialogWindowHandle() { |
| 210 | LOG(TRACE) << "Entering HtmlDialog::GetActiveDialogWindowHandle"; |
| 211 | DialogWindowInfo info; |
| 212 | info.hwndOwner = this->GetTopLevelWindowHandle(); |
| 213 | info.hwndDialog = NULL; |
| 214 | if (info.hwndOwner != NULL) { |
| 215 | ::EnumWindows(&HtmlDialog::FindChildDialogWindow, reinterpret_cast<LPARAM>(&info)); |
| 216 | } |
| 217 | if (info.hwndDialog != NULL) { |
| 218 | std::vector<char> window_class_name(34); |
| 219 | if (::GetClassNameA(info.hwndDialog, &window_class_name[0], 34)) { |
| 220 | if (strcmp(HTML_DIALOG_WINDOW_CLASS, &window_class_name[0]) == 0) { |
| 221 | HWND content_window_handle = this->FindContentWindowHandle(info.hwndDialog); |
| 222 | if (content_window_handle != NULL) { |
| 223 | // Must have a sleep here to give IE a chance to draw the window. |
| 224 | ::Sleep(250); |
| 225 | ::PostMessage(this->executor_handle(), |
| 226 | WD_NEW_HTML_DIALOG, |
| 227 | NULL, |
| 228 | reinterpret_cast<LPARAM>(content_window_handle)); |
| 229 | } |
| 230 | } |
| 231 | } |
| 232 | } |
| 233 | return info.hwndDialog; |
| 234 | } |
| 235 | |
| 236 | long HtmlDialog::GetWidth() { |
| 237 | LOG(TRACE) << "Entering HtmlDialog::GetWidth"; |
no test coverage detected