| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_DEVTOOLS_DEVTOOLS_FRONTEND_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_FRONTEND_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_FRONTEND_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_FRONTEND_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include "content/public/browser/devtools_frontend_host.h" | 8 #include "content/public/browser/devtools_frontend_host.h" |
| 9 #include "content/public/browser/web_contents_observer.h" | 9 #include "content/public/browser/web_contents_observer.h" |
| 10 | 10 |
| 11 namespace content { | 11 namespace content { |
| 12 | 12 |
| 13 class DevToolsFrontendHostImpl : public DevToolsFrontendHost, | 13 class DevToolsFrontendHostImpl : public DevToolsFrontendHost, |
| 14 public WebContentsObserver { | 14 public WebContentsObserver { |
| 15 public: | 15 public: |
| 16 DevToolsFrontendHostImpl(RenderViewHost* frontend_rvh, | 16 DevToolsFrontendHostImpl(RenderViewHost* frontend_rvh, |
| 17 DevToolsFrontendHost::Delegate* delegate); | 17 DevToolsFrontendHost::Delegate* delegate); |
| 18 virtual ~DevToolsFrontendHostImpl(); | 18 virtual ~DevToolsFrontendHostImpl(); |
| 19 | 19 |
| 20 // DevToolsFrontendHost implementation. | |
| 21 virtual void DispatchOnDevToolsFrontend(const std::string& message) OVERRIDE; | |
| 22 | |
| 23 private: | 20 private: |
| 24 // WebContentsObserver overrides. | 21 // WebContentsObserver overrides. |
| 25 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 22 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 26 | 23 |
| 27 void OnDispatchOnInspectorBackend(const std::string& message); | 24 void OnDispatchOnInspectorBackend(const std::string& message); |
| 28 void OnDispatchOnEmbedder(const std::string& message); | 25 void OnDispatchOnEmbedder(const std::string& message); |
| 29 | 26 |
| 30 DevToolsFrontendHost::Delegate* delegate_; | 27 DevToolsFrontendHost::Delegate* delegate_; |
| 31 DISALLOW_COPY_AND_ASSIGN(DevToolsFrontendHostImpl); | 28 DISALLOW_COPY_AND_ASSIGN(DevToolsFrontendHostImpl); |
| 32 }; | 29 }; |
| 33 | 30 |
| 34 } // namespace content | 31 } // namespace content |
| 35 | 32 |
| 36 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_FRONTEND_HOST_IMPL_H_ | 33 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_FRONTEND_HOST_IMPL_H_ |
| OLD | NEW |