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

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

Issue 182993003: Add the ability for DevTools to wrap network transactions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/devtools/chrome_devtools_manager_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/callback.h"
8 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
9 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "chrome/browser/devtools/devtools_protocol.h"
10 #include "content/public/browser/devtools_manager_delegate.h" 12 #include "content/public/browser/devtools_manager_delegate.h"
11 13
14 class Profile;
15
12 class ChromeDevToolsManagerDelegate : public content::DevToolsManagerDelegate { 16 class ChromeDevToolsManagerDelegate : public content::DevToolsManagerDelegate {
13 public: 17 public:
14 ChromeDevToolsManagerDelegate(); 18 ChromeDevToolsManagerDelegate();
15 virtual ~ChromeDevToolsManagerDelegate(); 19 virtual ~ChromeDevToolsManagerDelegate();
16 20
17 // content::DevToolsManagerDelegate overrides: 21 // content::DevToolsManagerDelegate overrides:
18 virtual void Inspect(content::BrowserContext* browser_context, 22 virtual void Inspect(content::BrowserContext* browser_context,
19 content::DevToolsAgentHost* agent_host) OVERRIDE; 23 content::DevToolsAgentHost* agent_host) OVERRIDE;
20 virtual base::DictionaryValue* HandleCommand( 24 virtual base::DictionaryValue* HandleCommand(
21 content::DevToolsAgentHost* agent_host, 25 content::DevToolsAgentHost* agent_host,
22 base::DictionaryValue* command_dict) OVERRIDE; 26 base::DictionaryValue* command_dict) OVERRIDE;
23 27
24 private: 28 private:
29 base::Callback<void(content::DevToolsAgentHost*, bool)> devtools_callback_;
30 bool devtools_callback_registered_;
31 void EnsureDevtoolsCallbackRegistered();
32
33 Profile* GetProfile(content::DevToolsAgentHost* agent_host);
34
35 scoped_ptr<DevToolsProtocol::Response> EmulateNetworkConditions(
36 content::DevToolsAgentHost* agent_host,
37 DevToolsProtocol::Command* command);
38
39 void UpdateNetworkState(content::DevToolsAgentHost* agent_host, bool offline);
40
41 void OnDevToolsStateChanged(content::DevToolsAgentHost* agent_host,
42 bool attached);
43
25 DISALLOW_COPY_AND_ASSIGN(ChromeDevToolsManagerDelegate); 44 DISALLOW_COPY_AND_ASSIGN(ChromeDevToolsManagerDelegate);
26 }; 45 };
27 46
28 #endif // CHROME_BROWSER_DEVTOOLS_CHROME_DEVTOOLS_MANAGER_DELEGATE_H_ 47 #endif // CHROME_BROWSER_DEVTOOLS_CHROME_DEVTOOLS_MANAGER_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/devtools/chrome_devtools_manager_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698