| 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/base/net_errors.h" |
| 14 #include "net/cookies/canonical_cookie.h" | 14 #include "net/cookies/canonical_cookie.h" |
| 15 | 15 |
| 16 namespace content { | 16 namespace content { |
| 17 | 17 |
| 18 class DevToolsSession; | 18 class DevToolsAgentHostImpl; |
| 19 class RenderFrameHostImpl; | 19 class RenderFrameHostImpl; |
| 20 struct BeginNavigationParams; | 20 struct BeginNavigationParams; |
| 21 struct CommonNavigationParams; | 21 struct CommonNavigationParams; |
| 22 struct ResourceRequest; | 22 struct ResourceRequest; |
| 23 struct ResourceRequestCompletionStatus; | 23 struct ResourceRequestCompletionStatus; |
| 24 struct ResourceResponseHead; | 24 struct ResourceResponseHead; |
| 25 | 25 |
| 26 namespace protocol { | 26 namespace protocol { |
| 27 | 27 |
| 28 class NetworkHandler : public DevToolsDomainHandler, | 28 class NetworkHandler : public DevToolsDomainHandler, |
| 29 public Network::Backend { | 29 public Network::Backend { |
| 30 public: | 30 public: |
| 31 NetworkHandler(); | 31 NetworkHandler(); |
| 32 ~NetworkHandler() override; | 32 ~NetworkHandler() override; |
| 33 | 33 |
| 34 static NetworkHandler* FromSession(DevToolsSession* session); | 34 static std::vector<NetworkHandler*> ForAgentHost(DevToolsAgentHostImpl* host); |
| 35 | 35 |
| 36 void Wire(UberDispatcher* dispatcher) override; | 36 void Wire(UberDispatcher* dispatcher) override; |
| 37 void SetRenderFrameHost(RenderFrameHostImpl* host) override; | 37 void SetRenderFrameHost(RenderFrameHostImpl* host) override; |
| 38 | 38 |
| 39 Response Enable(Maybe<int> max_total_size, | 39 Response Enable(Maybe<int> max_total_size, |
| 40 Maybe<int> max_resource_size) override; | 40 Maybe<int> max_resource_size) override; |
| 41 Response Disable() override; | 41 Response Disable() override; |
| 42 | 42 |
| 43 Response ClearBrowserCache() override; | 43 Response ClearBrowserCache() override; |
| 44 void ClearBrowserCookies( | 44 void ClearBrowserCookies( |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 bool enabled_; | 88 bool enabled_; |
| 89 std::string user_agent_; | 89 std::string user_agent_; |
| 90 | 90 |
| 91 DISALLOW_COPY_AND_ASSIGN(NetworkHandler); | 91 DISALLOW_COPY_AND_ASSIGN(NetworkHandler); |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 } // namespace protocol | 94 } // namespace protocol |
| 95 } // namespace content | 95 } // namespace content |
| 96 | 96 |
| 97 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_NETWORK_HANDLER_H_ | 97 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_NETWORK_HANDLER_H_ |
| OLD | NEW |