Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Side by Side Diff: chrome/browser/devtools/chrome_devtools_manager_delegate.h

Issue 563923006: [DevTools] Split network handling off ChromeDevToolsManagerDelegate to be reused on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_CHROME_DEVTOOLS_MANAGER_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_DEVTOOLS_CHROME_DEVTOOLS_MANAGER_DELEGATE_H_
6 #define CHROME_BROWSER_DEVTOOLS_CHROME_DEVTOOLS_MANAGER_DELEGATE_H_ 6 #define CHROME_BROWSER_DEVTOOLS_CHROME_DEVTOOLS_MANAGER_DELEGATE_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_network_protocol_handler.h"
11 #include "chrome/browser/devtools/devtools_protocol.h" 12 #include "chrome/browser/devtools/devtools_protocol.h"
12 #include "content/public/browser/devtools_manager_delegate.h" 13 #include "content/public/browser/devtools_manager_delegate.h"
13 14
14 class DevToolsNetworkConditions; 15 class DevToolsNetworkConditions;
15 class Profile; 16 class Profile;
16 17
17 class ChromeDevToolsManagerDelegate : public content::DevToolsManagerDelegate { 18 class ChromeDevToolsManagerDelegate : public content::DevToolsManagerDelegate {
18 public: 19 public:
19 ChromeDevToolsManagerDelegate(); 20 ChromeDevToolsManagerDelegate();
20 virtual ~ChromeDevToolsManagerDelegate(); 21 virtual ~ChromeDevToolsManagerDelegate();
21 22
22 // content::DevToolsManagerDelegate overrides: 23 // content::DevToolsManagerDelegate overrides:
23 virtual void Inspect(content::BrowserContext* browser_context, 24 virtual void Inspect(content::BrowserContext* browser_context,
24 content::DevToolsAgentHost* agent_host) OVERRIDE; 25 content::DevToolsAgentHost* agent_host) OVERRIDE;
25 virtual void DevToolsAgentStateChanged(content::DevToolsAgentHost* agent_host, 26 virtual void DevToolsAgentStateChanged(content::DevToolsAgentHost* agent_host,
26 bool attached) OVERRIDE; 27 bool attached) OVERRIDE;
27 virtual base::DictionaryValue* HandleCommand( 28 virtual base::DictionaryValue* HandleCommand(
28 content::DevToolsAgentHost* agent_host, 29 content::DevToolsAgentHost* agent_host,
29 base::DictionaryValue* command_dict) OVERRIDE; 30 base::DictionaryValue* command_dict) OVERRIDE;
30 31
31 private: 32 private:
32 Profile* GetProfile(content::DevToolsAgentHost* agent_host); 33 scoped_ptr<DevToolsNetworkProtocolHandler> network_protocol_handler_;
33
34 scoped_ptr<DevToolsProtocol::Response> CanEmulateNetworkConditions(
35 content::DevToolsAgentHost* agent_host,
36 DevToolsProtocol::Command* command);
37
38 scoped_ptr<DevToolsProtocol::Response> EmulateNetworkConditions(
39 content::DevToolsAgentHost* agent_host,
40 DevToolsProtocol::Command* command);
41
42 void UpdateNetworkState(
43 content::DevToolsAgentHost* agent_host,
44 scoped_ptr<DevToolsNetworkConditions> conditions);
45 34
46 DISALLOW_COPY_AND_ASSIGN(ChromeDevToolsManagerDelegate); 35 DISALLOW_COPY_AND_ASSIGN(ChromeDevToolsManagerDelegate);
47 }; 36 };
48 37
49 #endif // CHROME_BROWSER_DEVTOOLS_CHROME_DEVTOOLS_MANAGER_DELEGATE_H_ 38 #endif // CHROME_BROWSER_DEVTOOLS_CHROME_DEVTOOLS_MANAGER_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/devtools/BUILD.gn ('k') | chrome/browser/devtools/chrome_devtools_manager_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698