| 865 | } |
| 866 | |
| 867 | HWND Browser::GetActiveDialogWindowHandle() { |
| 868 | LOG(TRACE) << "Entering Browser::GetActiveDialogWindowHandle"; |
| 869 | |
| 870 | HWND active_dialog_handle = NULL; |
| 871 | |
| 872 | HWND content_window_handle = this->GetContentWindowHandle(); |
| 873 | if (content_window_handle == NULL) { |
| 874 | return active_dialog_handle; |
| 875 | } |
| 876 | |
| 877 | DWORD process_id = 0; |
| 878 | ::GetWindowThreadProcessId(content_window_handle, &process_id); |
| 879 | if (process_id == 0) { |
| 880 | return active_dialog_handle; |
| 881 | } |
| 882 | |
| 883 | ProcessWindowInfo process_win_info; |
| 884 | process_win_info.dwProcessId = process_id; |
| 885 | process_win_info.hwndBrowser = NULL; |
| 886 | ::EnumWindows(&BrowserFactory::FindDialogWindowForProcess, |
| 887 | reinterpret_cast<LPARAM>(&process_win_info)); |
| 888 | if (process_win_info.hwndBrowser != NULL) { |
| 889 | active_dialog_handle = process_win_info.hwndBrowser; |
| 890 | this->CheckDialogType(active_dialog_handle); |
| 891 | } |
| 892 | |
| 893 | return active_dialog_handle; |
| 894 | } |
| 895 | |
| 896 | void Browser::CheckDialogType(HWND dialog_window_handle) { |
| 897 | LOG(TRACE) << "Entering Browser::CheckDialogType"; |
no test coverage detected