webContents: providing response headers in did-get-response-details event

This commit is contained in:
deepak1556 2015-05-07 17:12:40 +05:30
parent 9b445c27a2
commit 04b797ff0c
4 changed files with 13 additions and 2 deletions

View file

@ -278,13 +278,19 @@ void WebContents::DidStopLoading(content::RenderViewHost* render_view_host) {
void WebContents::DidGetResourceResponseStart(
const content::ResourceRequestDetails& details) {
auto context = AtomBrowserContext::Get();
std::string headers;
if (context)
headers = context->GetNetworkDelegate()->GetResponseHeaders(details.url);
Emit("did-get-response-details",
details.socket_address.IsEmpty(),
details.url,
details.original_url,
details.http_response_code,
details.method,
details.referrer);
details.referrer,
headers);
}
void WebContents::DidGetRedirectForResourceRequest(