| 114 | } |
| 115 | |
| 116 | LRESULT AsyncScriptExecutor::OnSetElementArgument(UINT uMsg, |
| 117 | WPARAM wParam, |
| 118 | LPARAM lParam, |
| 119 | BOOL& bHandled) { |
| 120 | LOG(TRACE) << "Entering AsyncScriptExecutor::OnSetElementArgument"; |
| 121 | ElementInfo* info = reinterpret_cast<ElementInfo*>(lParam); |
| 122 | std::string element_id = info->element_id; |
| 123 | std::vector<std::string>::iterator item = std::find(this->element_id_list_.begin(), |
| 124 | this->element_id_list_.end(), |
| 125 | element_id); |
| 126 | if (item == this->element_id_list_.end()) { |
| 127 | LOG(WARN) << "Invalid element ID sent from main repository: " << element_id; |
| 128 | } |
| 129 | CComPtr<IHTMLElement> element; |
| 130 | ::CoGetInterfaceAndReleaseStream(info->element_stream, |
| 131 | IID_IHTMLElement, |
| 132 | reinterpret_cast<void**>(&element)); |
| 133 | delete info; |
| 134 | ElementHandle element_handle(new Element(element, NULL, element_id)); |
| 135 | this->element_repository_->AddManagedElement(element_handle); |
| 136 | this->element_id_list_.erase(item); |
| 137 | return WD_SUCCESS; |
| 138 | } |
| 139 | |
| 140 | LRESULT AsyncScriptExecutor::OnGetRequiredElementList(UINT uMsg, |
| 141 | WPARAM wParam, |
nothing calls this directly
no test coverage detected