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 CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_PROTOCOL_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_PROTOCOL_HANDLER_H_ |
6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_PROTOCOL_HANDLER_H_ | 6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_PROTOCOL_HANDLER_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "chrome/browser/devtools/devtools_protocol.h" | 11 #include "chrome/browser/devtools/devtools_protocol.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 class DevToolsAgentHost; | 14 class DevToolsAgentHost; |
15 } | 15 } |
16 | 16 |
17 class DevToolsNetworkConditions; | 17 class DevToolsNetworkConditions; |
18 class Profile; | 18 class Profile; |
19 | 19 |
20 class DevToolsNetworkProtocolHandler { | 20 class DevToolsNetworkProtocolHandler { |
21 public: | 21 public: |
22 DevToolsNetworkProtocolHandler(); | 22 DevToolsNetworkProtocolHandler(); |
23 ~DevToolsNetworkProtocolHandler(); | 23 ~DevToolsNetworkProtocolHandler(); |
24 | 24 |
25 void DevToolsAgentStateChanged(content::DevToolsAgentHost* agent_host, | 25 void DevToolsAgentStateChanged(content::DevToolsAgentHost* agent_host, |
26 bool attached); | 26 bool attached); |
27 base::DictionaryValue* HandleCommand( | 27 base::DictionaryValue* HandleCommand(content::DevToolsAgentHost* agent_host, |
28 content::DevToolsAgentHost* agent_host, | 28 int id, |
29 base::DictionaryValue* command_dict); | 29 const std::string& method, |
| 30 base::DictionaryValue* params); |
30 | 31 |
31 private: | 32 private: |
32 scoped_ptr<base::DictionaryValue> CanEmulateNetworkConditions( | 33 scoped_ptr<base::DictionaryValue> CanEmulateNetworkConditions( |
33 content::DevToolsAgentHost* agent_host, | 34 content::DevToolsAgentHost* agent_host, |
34 int command_id, | 35 int command_id, |
35 base::DictionaryValue* params); | 36 base::DictionaryValue* params); |
36 | 37 |
37 scoped_ptr<base::DictionaryValue> EmulateNetworkConditions( | 38 scoped_ptr<base::DictionaryValue> EmulateNetworkConditions( |
38 content::DevToolsAgentHost* agent_host, | 39 content::DevToolsAgentHost* agent_host, |
39 int command_id, | 40 int command_id, |
40 base::DictionaryValue* params); | 41 base::DictionaryValue* params); |
41 | 42 |
42 void UpdateNetworkState( | 43 void UpdateNetworkState( |
43 content::DevToolsAgentHost* agent_host, | 44 content::DevToolsAgentHost* agent_host, |
44 scoped_ptr<DevToolsNetworkConditions> conditions); | 45 scoped_ptr<DevToolsNetworkConditions> conditions); |
45 | 46 |
46 DISALLOW_COPY_AND_ASSIGN(DevToolsNetworkProtocolHandler); | 47 DISALLOW_COPY_AND_ASSIGN(DevToolsNetworkProtocolHandler); |
47 }; | 48 }; |
48 | 49 |
49 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_PROTOCOL_HANDLER_H_ | 50 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_PROTOCOL_HANDLER_H_ |
OLD | NEW |