| 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 "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "content/browser/devtools/protocol/devtools_domain_handler.h" |
| 9 #include "content/browser/devtools/protocol/network.h" | 10 #include "content/browser/devtools/protocol/network.h" |
| 10 #include "net/cookies/canonical_cookie.h" | 11 #include "net/cookies/canonical_cookie.h" |
| 11 | 12 |
| 12 namespace content { | 13 namespace content { |
| 13 | 14 |
| 15 class DevToolsSession; |
| 14 class RenderFrameHostImpl; | 16 class RenderFrameHostImpl; |
| 15 | 17 |
| 16 namespace protocol { | 18 namespace protocol { |
| 17 | 19 |
| 18 class NetworkHandler : public Network::Backend { | 20 class NetworkHandler : public DevToolsDomainHandler, |
| 21 public Network::Backend { |
| 19 public: | 22 public: |
| 20 NetworkHandler(); | 23 NetworkHandler(); |
| 21 ~NetworkHandler() override; | 24 ~NetworkHandler() override; |
| 22 | 25 |
| 23 void SetRenderFrameHost(RenderFrameHostImpl* host); | 26 static NetworkHandler* FromSession(DevToolsSession* session); |
| 24 void Wire(UberDispatcher*); | 27 |
| 28 void Wire(UberDispatcher* dispatcher) override; |
| 29 void SetRenderFrameHost(RenderFrameHostImpl* host) override; |
| 25 | 30 |
| 26 Response Enable(Maybe<int> max_total_size, | 31 Response Enable(Maybe<int> max_total_size, |
| 27 Maybe<int> max_resource_size) override; | 32 Maybe<int> max_resource_size) override; |
| 28 Response Disable() override; | 33 Response Disable() override; |
| 29 | 34 |
| 30 Response ClearBrowserCache() override; | 35 Response ClearBrowserCache() override; |
| 31 Response ClearBrowserCookies() override; | 36 Response ClearBrowserCookies() override; |
| 32 | 37 |
| 33 void GetCookies(std::unique_ptr<GetCookiesCallback> callback) override; | 38 void GetCookies(std::unique_ptr<GetCookiesCallback> callback) override; |
| 34 void GetAllCookies(std::unique_ptr<GetAllCookiesCallback> callback) override; | 39 void GetAllCookies(std::unique_ptr<GetAllCookiesCallback> callback) override; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 58 bool enabled_; | 63 bool enabled_; |
| 59 std::string user_agent_; | 64 std::string user_agent_; |
| 60 | 65 |
| 61 DISALLOW_COPY_AND_ASSIGN(NetworkHandler); | 66 DISALLOW_COPY_AND_ASSIGN(NetworkHandler); |
| 62 }; | 67 }; |
| 63 | 68 |
| 64 } // namespace protocol | 69 } // namespace protocol |
| 65 } // namespace content | 70 } // namespace content |
| 66 | 71 |
| 67 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_NETWORK_HANDLER_H_ | 72 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_NETWORK_HANDLER_H_ |
| OLD | NEW |