| 240 | } |
| 241 | |
| 242 | LRESULT AsyncScriptExecutor::OnGetResult(UINT uMsg, |
| 243 | WPARAM wParam, |
| 244 | LPARAM lParam, |
| 245 | BOOL& bHandled) { |
| 246 | LOG(TRACE) << "Entering AsyncScriptExecutor::OnGetResult"; |
| 247 | // NOTE: We need to tell this window to close itself. If and when marshaling |
| 248 | // of the actual variant result to the calling thread is implemented, posting |
| 249 | // the message to close the window will have to be moved to the method that |
| 250 | // retrieves the marshaled result. |
| 251 | if (this->main_element_repository_handle_ != NULL) { |
| 252 | Json::Value* result = reinterpret_cast<Json::Value*>(lParam); |
| 253 | *result = this->script_result_; |
| 254 | } else { |
| 255 | ::PostMessage(this->m_hWnd, WM_CLOSE, NULL, NULL); |
| 256 | } |
| 257 | return this->status_code_; |
| 258 | } |
| 259 | |
| 260 | LRESULT AsyncScriptExecutor::OnNotifyElementTransferred(UINT uMsg, |
| 261 | WPARAM wParam, |