EventType can not be OR'ed
This commit is contained in:
parent
15cc8164b8
commit
d3c8363450
1 changed files with 10 additions and 11 deletions
|
@ -31,15 +31,14 @@ class AtomNetworkDelegate : public brightray::NetworkDelegate {
|
||||||
base::Callback<BlockingResponse(const base::DictionaryValue&)>;
|
base::Callback<BlockingResponse(const base::DictionaryValue&)>;
|
||||||
|
|
||||||
enum EventType {
|
enum EventType {
|
||||||
kInvalidEvent = 0,
|
kOnBeforeRequest,
|
||||||
kOnBeforeRequest = 1 << 0,
|
kOnBeforeSendHeaders,
|
||||||
kOnBeforeSendHeaders = 1 << 1,
|
kOnSendHeaders,
|
||||||
kOnSendHeaders = 1 << 2,
|
kOnHeadersReceived,
|
||||||
kOnHeadersReceived = 1 << 3,
|
kOnBeforeRedirect,
|
||||||
kOnBeforeRedirect = 1 << 4,
|
kOnResponseStarted,
|
||||||
kOnResponseStarted = 1 << 5,
|
kOnCompleted,
|
||||||
kOnCompleted = 1 << 6,
|
kOnErrorOccurred,
|
||||||
kOnErrorOccurred = 1 << 7,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ListenerInfo {
|
struct ListenerInfo {
|
||||||
|
@ -69,8 +68,6 @@ class AtomNetworkDelegate : public brightray::NetworkDelegate {
|
||||||
const Listener& callback);
|
const Listener& callback);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void OnErrorOccurred(net::URLRequest* request);
|
|
||||||
|
|
||||||
// net::NetworkDelegate:
|
// net::NetworkDelegate:
|
||||||
int OnBeforeURLRequest(net::URLRequest* request,
|
int OnBeforeURLRequest(net::URLRequest* request,
|
||||||
const net::CompletionCallback& callback,
|
const net::CompletionCallback& callback,
|
||||||
|
@ -91,6 +88,8 @@ class AtomNetworkDelegate : public brightray::NetworkDelegate {
|
||||||
void OnResponseStarted(net::URLRequest* request) override;
|
void OnResponseStarted(net::URLRequest* request) override;
|
||||||
void OnCompleted(net::URLRequest* request, bool started) override;
|
void OnCompleted(net::URLRequest* request, bool started) override;
|
||||||
|
|
||||||
|
void OnErrorOccurred(net::URLRequest* request);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::map<EventType, ListenerInfo> event_listener_map_;
|
std::map<EventType, ListenerInfo> event_listener_map_;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue