| 297 | } |
| 298 | |
| 299 | std::string Browser::GetBrowserUrl() { |
| 300 | LOG(TRACE) << "Entering Browser::GetBrowserUrl"; |
| 301 | |
| 302 | CComBSTR url; |
| 303 | HRESULT hr = this->browser_->get_LocationURL(&url); |
| 304 | if (FAILED(hr)) { |
| 305 | LOGHR(WARN, hr) << "Unable to get current URL, call to IWebBrowser2::get_LocationURL failed"; |
| 306 | return ""; |
| 307 | } |
| 308 | |
| 309 | std::wstring converted_url = url; |
| 310 | std::string current_url = StringUtilities::ToString(converted_url); |
| 311 | return current_url; |
| 312 | } |
| 313 | |
| 314 | HWND Browser::GetContentWindowHandle() { |
| 315 | LOG(TRACE) << "Entering Browser::GetContentWindowHandle"; |
no test coverage detected