OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_NETWORK_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_NETWORK_HANDLER_H_ |
6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_NETWORK_HANDLER_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_NETWORK_HANDLER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "content/browser/devtools/protocol/devtools_domain_handler.h" | 11 #include "content/browser/devtools/protocol/devtools_domain_handler.h" |
12 #include "content/browser/devtools/protocol/network.h" | 12 #include "content/browser/devtools/protocol/network.h" |
| 13 #include "net/base/net_errors.h" |
13 #include "net/cookies/canonical_cookie.h" | 14 #include "net/cookies/canonical_cookie.h" |
14 | 15 |
15 namespace content { | 16 namespace content { |
16 | 17 |
17 class DevToolsSession; | 18 class DevToolsSession; |
18 class RenderFrameHostImpl; | 19 class RenderFrameHostImpl; |
| 20 struct BeginNavigationParams; |
| 21 struct CommonNavigationParams; |
19 struct ResourceRequest; | 22 struct ResourceRequest; |
20 struct ResourceRequestCompletionStatus; | 23 struct ResourceRequestCompletionStatus; |
21 struct ResourceResponseHead; | 24 struct ResourceResponseHead; |
22 | 25 |
23 namespace protocol { | 26 namespace protocol { |
24 | 27 |
25 class NetworkHandler : public DevToolsDomainHandler, | 28 class NetworkHandler : public DevToolsDomainHandler, |
26 public Network::Backend { | 29 public Network::Backend { |
27 public: | 30 public: |
28 NetworkHandler(); | 31 NetworkHandler(); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 void NavigationPreloadRequestSent(int worker_version_id, | 67 void NavigationPreloadRequestSent(int worker_version_id, |
65 const std::string& request_id, | 68 const std::string& request_id, |
66 const ResourceRequest& request); | 69 const ResourceRequest& request); |
67 void NavigationPreloadResponseReceived(int worker_version_id, | 70 void NavigationPreloadResponseReceived(int worker_version_id, |
68 const std::string& request_id, | 71 const std::string& request_id, |
69 const GURL& url, | 72 const GURL& url, |
70 const ResourceResponseHead& head); | 73 const ResourceResponseHead& head); |
71 void NavigationPreloadCompleted( | 74 void NavigationPreloadCompleted( |
72 const std::string& request_id, | 75 const std::string& request_id, |
73 const ResourceRequestCompletionStatus& completion_status); | 76 const ResourceRequestCompletionStatus& completion_status); |
| 77 void NavigationFailed(const CommonNavigationParams& common_params, |
| 78 const BeginNavigationParams& begin_params, |
| 79 net::Error error_code); |
74 | 80 |
75 bool enabled() const { return enabled_; } | 81 bool enabled() const { return enabled_; } |
76 std::string UserAgentOverride() const; | 82 std::string UserAgentOverride() const; |
77 | 83 |
78 private: | 84 private: |
79 std::unique_ptr<Network::Frontend> frontend_; | 85 std::unique_ptr<Network::Frontend> frontend_; |
80 RenderFrameHostImpl* host_; | 86 RenderFrameHostImpl* host_; |
81 bool enabled_; | 87 bool enabled_; |
82 std::string user_agent_; | 88 std::string user_agent_; |
83 | 89 |
84 DISALLOW_COPY_AND_ASSIGN(NetworkHandler); | 90 DISALLOW_COPY_AND_ASSIGN(NetworkHandler); |
85 }; | 91 }; |
86 | 92 |
87 } // namespace protocol | 93 } // namespace protocol |
88 } // namespace content | 94 } // namespace content |
89 | 95 |
90 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_NETWORK_HANDLER_H_ | 96 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_NETWORK_HANDLER_H_ |
OLD | NEW |