| 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_FRONTEND_H_ | 5 #ifndef CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_FRONTEND_H_ |
| 6 #define CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_FRONTEND_H_ | 6 #define CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_FRONTEND_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 public DevToolsFrontendHost::Delegate, | 23 public DevToolsFrontendHost::Delegate, |
| 24 public DevToolsAgentHostClient { | 24 public DevToolsAgentHostClient { |
| 25 public: | 25 public: |
| 26 static ShellDevToolsFrontend* Show(WebContents* inspected_contents); | 26 static ShellDevToolsFrontend* Show(WebContents* inspected_contents); |
| 27 | 27 |
| 28 void Activate(); | 28 void Activate(); |
| 29 void Focus(); | 29 void Focus(); |
| 30 void InspectElementAt(int x, int y); | 30 void InspectElementAt(int x, int y); |
| 31 void Close(); | 31 void Close(); |
| 32 | 32 |
| 33 void SwitchToTarget(WebContents* inspected_contents); |
| 34 void DisconnectFromTarget(); |
| 35 |
| 33 Shell* frontend_shell() const { return frontend_shell_; } | 36 Shell* frontend_shell() const { return frontend_shell_; } |
| 34 | 37 |
| 35 protected: | 38 protected: |
| 36 ShellDevToolsFrontend(Shell* frontend_shell, DevToolsAgentHost* agent_host); | 39 ShellDevToolsFrontend(Shell* frontend_shell, DevToolsAgentHost* agent_host); |
| 37 ~ShellDevToolsFrontend() override; | 40 ~ShellDevToolsFrontend() override; |
| 38 | 41 |
| 42 // content::DevToolsAgentHostClient implementation. |
| 43 void AgentHostClosed(DevToolsAgentHost* agent_host, bool replaced) override; |
| 44 void DispatchProtocolMessage(DevToolsAgentHost* agent_host, |
| 45 const std::string& message) override; |
| 46 |
| 39 private: | 47 private: |
| 40 // WebContentsObserver overrides | 48 // WebContentsObserver overrides |
| 41 void RenderViewCreated(RenderViewHost* render_view_host) override; | 49 void RenderViewCreated(RenderViewHost* render_view_host) override; |
| 42 void WebContentsDestroyed() override; | 50 void WebContentsDestroyed() override; |
| 43 | 51 |
| 44 // content::DevToolsFrontendHost::Delegate implementation. | 52 // content::DevToolsFrontendHost::Delegate implementation. |
| 45 void HandleMessageFromDevToolsFrontend(const std::string& message) override; | 53 void HandleMessageFromDevToolsFrontend(const std::string& message) override; |
| 46 void HandleMessageFromDevToolsFrontendToBackend( | 54 void HandleMessageFromDevToolsFrontendToBackend( |
| 47 const std::string& message) override; | 55 const std::string& message) override; |
| 48 | 56 |
| 49 // content::DevToolsAgentHostClient implementation. | |
| 50 void DispatchProtocolMessage(DevToolsAgentHost* agent_host, | |
| 51 const std::string& message) override; | |
| 52 void AgentHostClosed(DevToolsAgentHost* agent_host, bool replaced) override; | |
| 53 | |
| 54 Shell* frontend_shell_; | 57 Shell* frontend_shell_; |
| 55 scoped_refptr<DevToolsAgentHost> agent_host_; | 58 scoped_refptr<DevToolsAgentHost> agent_host_; |
| 56 scoped_ptr<DevToolsFrontendHost> frontend_host_; | 59 scoped_ptr<DevToolsFrontendHost> frontend_host_; |
| 57 | 60 |
| 58 DISALLOW_COPY_AND_ASSIGN(ShellDevToolsFrontend); | 61 DISALLOW_COPY_AND_ASSIGN(ShellDevToolsFrontend); |
| 59 }; | 62 }; |
| 60 | 63 |
| 61 } // namespace content | 64 } // namespace content |
| 62 | 65 |
| 63 #endif // CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_FRONTEND_H_ | 66 #endif // CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_FRONTEND_H_ |
| OLD | NEW |