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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_PROTOCOL_HANDLER_H_
6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_PROTOCOL_HANDLER_H_
8 #include "base/compiler_specific.h"
9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "chrome/browser/devtools/devtools_protocol.h"
14 class DevToolsAgentHost
;
17 class DevToolsNetworkConditions
;
20 class DevToolsNetworkProtocolHandler
{
22 DevToolsNetworkProtocolHandler();
23 ~DevToolsNetworkProtocolHandler();
25 void DevToolsAgentStateChanged(content::DevToolsAgentHost
* agent_host
,
27 base::DictionaryValue
* HandleCommand(
28 content::DevToolsAgentHost
* agent_host
,
29 base::DictionaryValue
* command_dict
);
32 scoped_ptr
<base::DictionaryValue
> CanEmulateNetworkConditions(
33 content::DevToolsAgentHost
* agent_host
,
35 const base::DictionaryValue
* params
);
37 scoped_ptr
<base::DictionaryValue
> EmulateNetworkConditions(
38 content::DevToolsAgentHost
* agent_host
,
40 const base::DictionaryValue
* params
);
42 void UpdateNetworkState(
43 content::DevToolsAgentHost
* agent_host
,
44 scoped_ptr
<DevToolsNetworkConditions
> conditions
);
46 DISALLOW_COPY_AND_ASSIGN(DevToolsNetworkProtocolHandler
);
49 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_PROTOCOL_HANDLER_H_