Add resourceType arg to webContents did-get-response-details event.

Fixes #5074 and follows @zcbenz's recommendation to expose ResourceTypeToString from atom_network_delegate publicly.
Also adds testing for other arguments to the `did-get-response-details` events, since there were no existing tests for them.
This commit is contained in:
Rob Brackett 2016-04-08 11:19:36 -07:00
parent 066092abb6
commit c1b1348735
5 changed files with 39 additions and 4 deletions

View file

@ -15,6 +15,7 @@
#include "net/base/net_errors.h"
#include "net/http/http_request_headers.h"
#include "net/http/http_response_headers.h"
#include "content/public/browser/resource_request_info.h"
namespace extensions {
class URLPattern;
@ -24,6 +25,8 @@ namespace atom {
using URLPatterns = std::set<extensions::URLPattern>;
const char* ResourceTypeToString(content::ResourceType type);
class AtomNetworkDelegate : public brightray::NetworkDelegate {
public:
using ResponseCallback = base::Callback<void(const base::DictionaryValue&)>;