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 "content/browser/devtools/protocol/devtools_protocol_handler_impl.h" | 8 #include "content/browser/devtools/protocol/devtools_protocol_handler_impl.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
| 11 |
| 12 class RenderViewHost; |
| 13 |
11 namespace devtools { | 14 namespace devtools { |
12 namespace network { | 15 namespace network { |
13 | 16 |
14 class NetworkHandler { | 17 class NetworkHandler { |
15 public: | 18 public: |
16 typedef DevToolsProtocolClient::Response Response; | 19 typedef DevToolsProtocolClient::Response Response; |
17 | 20 |
18 NetworkHandler(); | 21 NetworkHandler(); |
19 virtual ~NetworkHandler(); | 22 virtual ~NetworkHandler(); |
20 | 23 |
| 24 void SetRenderViewHost(RenderViewHost* host); |
| 25 |
21 Response ClearBrowserCache(); | 26 Response ClearBrowserCache(); |
22 Response ClearBrowserCookies(); | 27 Response ClearBrowserCookies(); |
23 Response CanEmulateNetworkConditions(bool* result); | 28 Response CanEmulateNetworkConditions(bool* result); |
24 | 29 |
25 Response EmulateNetworkConditions(bool offline, | 30 Response EmulateNetworkConditions(bool offline, |
26 double latency, | 31 double latency, |
27 double download_throughput, | 32 double download_throughput, |
28 double upload_throughput); | 33 double upload_throughput); |
29 | 34 |
30 private: | 35 private: |
| 36 RenderViewHost* host_; |
| 37 |
31 DISALLOW_COPY_AND_ASSIGN(NetworkHandler); | 38 DISALLOW_COPY_AND_ASSIGN(NetworkHandler); |
32 }; | 39 }; |
33 | 40 |
34 } // namespace network | 41 } // namespace network |
35 } // namespace devtools | 42 } // namespace devtools |
36 } // namespace content | 43 } // namespace content |
37 | 44 |
38 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_NETWORK_HANDLER_H_ | 45 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_NETWORK_HANDLER_H_ |
OLD | NEW |