| 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 "components/devtools_http_handler/devtools_http_handler_delegate.h" | 10 #include "components/devtools_http_handler/devtools_http_handler_delegate.h" |
| 11 #include "content/public/browser/devtools_manager_delegate.h" | 11 #include "content/public/browser/devtools_manager_delegate.h" |
| 12 | 12 |
| 13 namespace devtools_http_handler { | 13 namespace devtools_http_handler { |
| 14 class DevToolsHttpHandler; | 14 class DevToolsHttpHandler; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace content { | 17 namespace content { |
| 18 | 18 |
| 19 class BrowserContext; | 19 class BrowserContext; |
| 20 | 20 |
| 21 class ShellDevToolsManagerDelegate : public DevToolsManagerDelegate { | 21 class ShellDevToolsManagerDelegate : public DevToolsManagerDelegate { |
| 22 public: | 22 public: |
| 23 static devtools_http_handler::DevToolsHttpHandler* CreateHttpHandler( | 23 static devtools_http_handler::DevToolsHttpHandler* CreateHttpHandler( |
| 24 BrowserContext* browser_context); | 24 BrowserContext* browser_context); |
| 25 | 25 |
| 26 ShellDevToolsManagerDelegate(); | 26 explicit ShellDevToolsManagerDelegate(BrowserContext* browser_context); |
| 27 ~ShellDevToolsManagerDelegate() override; | 27 ~ShellDevToolsManagerDelegate() override; |
| 28 | 28 |
| 29 // DevToolsManagerDelegate implementation. | 29 // DevToolsManagerDelegate implementation. |
| 30 void Inspect(DevToolsAgentHost* agent_host) override {} | 30 void Inspect(DevToolsAgentHost* agent_host) override {} |
| 31 void DevToolsAgentStateChanged(DevToolsAgentHost* agent_host, | 31 void DevToolsAgentStateChanged(DevToolsAgentHost* agent_host, |
| 32 bool attached) override {} | 32 bool attached) override {} |
| 33 base::DictionaryValue* HandleCommand(DevToolsAgentHost* agent_host, | 33 base::DictionaryValue* HandleCommand(DevToolsAgentHost* agent_host, |
| 34 base::DictionaryValue* command) override; | 34 base::DictionaryValue* command) override; |
| 35 std::string GetTargetType(RenderFrameHost* host) override; | 35 std::string GetTargetType(RenderFrameHost* host) override; |
| 36 std::string GetTargetTitle(RenderFrameHost* host) override; | 36 std::string GetTargetTitle(RenderFrameHost* host) override; |
| 37 scoped_refptr<DevToolsAgentHost> CreateNewTarget(const GURL& url) override; |
| 37 | 38 |
| 38 private: | 39 private: |
| 40 BrowserContext* browser_context_; |
| 39 DISALLOW_COPY_AND_ASSIGN(ShellDevToolsManagerDelegate); | 41 DISALLOW_COPY_AND_ASSIGN(ShellDevToolsManagerDelegate); |
| 40 }; | 42 }; |
| 41 | 43 |
| 42 } // namespace content | 44 } // namespace content |
| 43 | 45 |
| 44 #endif // CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_MANAGER_DELEGATE_H_ | 46 #endif // CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_MANAGER_DELEGATE_H_ |
| OLD | NEW |