| 177 | } |
| 178 | |
| 179 | bool IESession::WaitForCommandExecutorExit(int timeout_in_milliseconds) { |
| 180 | LOG(TRACE) << "Entering IESession::WaitForCommandExecutorExit"; |
| 181 | int is_quitting = static_cast<int>(::SendMessage(this->executor_window_handle_, |
| 182 | WD_GET_QUIT_STATUS, |
| 183 | NULL, |
| 184 | NULL)); |
| 185 | int retry_count = timeout_in_milliseconds / EXECUTOR_EXIT_WAIT_INTERVAL; |
| 186 | while (is_quitting > 0 && --retry_count > 0) { |
| 187 | ::Sleep(EXECUTOR_EXIT_WAIT_INTERVAL); |
| 188 | is_quitting = static_cast<int>(::SendMessage(this->executor_window_handle_, |
| 189 | WD_GET_QUIT_STATUS, |
| 190 | NULL, |
| 191 | NULL)); |
| 192 | } |
| 193 | return is_quitting == 0; |
| 194 | } |
| 195 | |
| 196 | bool IESession::ExecuteCommand(const std::string& serialized_command, |
| 197 | std::string* serialized_response) { |