| 188 | } |
| 189 | |
| 190 | HWND HtmlDialog::GetTopLevelWindowHandle(void) { |
| 191 | LOG(TRACE) << "Entering HtmlDialog::GetTopLevelWindowHandle"; |
| 192 | HWND parent_handle = ::GetParent(this->window_handle()); |
| 193 | |
| 194 | // "Internet Explorer_Hidden\0" == 25 |
| 195 | std::vector<char> parent_class_buffer(25); |
| 196 | if (::GetClassNameA(parent_handle, &parent_class_buffer[0], 25)) { |
| 197 | if (strcmp(HIDDEN_PARENT_WINDOW_CLASS, &parent_class_buffer[0]) == 0) { |
| 198 | // Some versions of Internet Explorer re-parent a closing showModalDialog |
| 199 | // window to a hidden parent window. If that is what we see happening |
| 200 | // here, that will be equivalent to the parent window no longer being |
| 201 | // valid, and we can return an invalid handle, indicating the window is |
| 202 | // "closed." |
| 203 | return NULL; |
| 204 | } |
| 205 | } |
| 206 | return parent_handle; |
| 207 | } |
| 208 | |
| 209 | HWND HtmlDialog::GetActiveDialogWindowHandle() { |
| 210 | LOG(TRACE) << "Entering HtmlDialog::GetActiveDialogWindowHandle"; |
no test coverage detected