OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SHELL_BROWSER_SHELL_DEVTOOLS_MANAGER_DELEGATE_H_ | 5 #ifndef CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_MANAGER_DELEGATE_H_ |
6 #define CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_MANAGER_DELEGATE_H_ | 6 #define CONTENT_SHELL_BROWSER_SHELL_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 "content/public/browser/devtools_manager_delegate.h" | 10 #include "content/public/browser/devtools_manager_delegate.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 class BrowserContext; | 14 class BrowserContext; |
15 | 15 |
16 class ShellDevToolsManagerDelegate : public DevToolsManagerDelegate { | 16 class ShellDevToolsManagerDelegate : public DevToolsManagerDelegate { |
17 public: | 17 public: |
18 static void StartHttpHandler(BrowserContext* browser_context); | 18 static void StartHttpHandler(BrowserContext* browser_context); |
19 static void StopHttpHandler(); | 19 static void StopHttpHandler(); |
| 20 static int GetHttpHandlerPort(); |
20 | 21 |
21 explicit ShellDevToolsManagerDelegate(BrowserContext* browser_context); | 22 explicit ShellDevToolsManagerDelegate(BrowserContext* browser_context); |
22 ~ShellDevToolsManagerDelegate() override; | 23 ~ShellDevToolsManagerDelegate() override; |
23 | 24 |
24 // DevToolsManagerDelegate implementation. | 25 // DevToolsManagerDelegate implementation. |
25 void Inspect(DevToolsAgentHost* agent_host) override {} | 26 void Inspect(DevToolsAgentHost* agent_host) override {} |
26 void DevToolsAgentStateChanged(DevToolsAgentHost* agent_host, | 27 void DevToolsAgentStateChanged(DevToolsAgentHost* agent_host, |
27 bool attached) override {} | 28 bool attached) override {} |
28 base::DictionaryValue* HandleCommand(DevToolsAgentHost* agent_host, | 29 base::DictionaryValue* HandleCommand(DevToolsAgentHost* agent_host, |
29 base::DictionaryValue* command) override; | 30 base::DictionaryValue* command) override; |
30 std::string GetTargetType(RenderFrameHost* host) override; | 31 std::string GetTargetType(RenderFrameHost* host) override; |
31 std::string GetTargetTitle(RenderFrameHost* host) override; | 32 std::string GetTargetTitle(RenderFrameHost* host) override; |
32 std::string GetTargetDescription(RenderFrameHost* host) override; | 33 std::string GetTargetDescription(RenderFrameHost* host) override; |
33 scoped_refptr<DevToolsAgentHost> CreateNewTarget(const GURL& url) override; | 34 scoped_refptr<DevToolsAgentHost> CreateNewTarget(const GURL& url) override; |
34 std::string GetDiscoveryPageHTML() override; | 35 std::string GetDiscoveryPageHTML() override; |
35 std::string GetFrontendResource(const std::string& path) override; | 36 std::string GetFrontendResource(const std::string& path) override; |
36 | 37 |
37 private: | 38 private: |
38 BrowserContext* browser_context_; | 39 BrowserContext* browser_context_; |
39 DISALLOW_COPY_AND_ASSIGN(ShellDevToolsManagerDelegate); | 40 DISALLOW_COPY_AND_ASSIGN(ShellDevToolsManagerDelegate); |
40 }; | 41 }; |
41 | 42 |
42 } // namespace content | 43 } // namespace content |
43 | 44 |
44 #endif // CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_MANAGER_DELEGATE_H_ | 45 #endif // CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_MANAGER_DELEGATE_H_ |
OLD | NEW |