OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_DEBUGGER_RENDER_VIEW_DEVTOOLS_AGENT_HOST_H_ |
| 6 #define CONTENT_BROWSER_DEBUGGER_RENDER_VIEW_DEVTOOLS_AGENT_HOST_H_ |
| 7 #pragma once |
| 8 |
| 9 #include <map> |
| 10 |
| 11 #include "base/basictypes.h" |
| 12 #include "content/browser/debugger/devtools_agent_host.h" |
| 13 #include "content/common/notification_observer.h" |
| 14 #include "content/common/notification_registrar.h" |
| 15 |
| 16 class RenderViewHost; |
| 17 |
| 18 class RenderViewDevToolsAgentHost : public DevToolsAgentHost, |
| 19 public NotificationObserver { |
| 20 public: |
| 21 static DevToolsAgentHost* FindFor(RenderViewHost*); |
| 22 |
| 23 private: |
| 24 RenderViewDevToolsAgentHost(RenderViewHost*); |
| 25 virtual ~RenderViewDevToolsAgentHost(); |
| 26 |
| 27 // DevToolsAgentHost implementation. |
| 28 virtual void SendMessageToAgent(IPC::Message* msg); |
| 29 virtual void NotifyClientClosing(); |
| 30 virtual int GetRenderProcessId(); |
| 31 |
| 32 // Overridden from NotificationObserver: |
| 33 virtual void Observe(int type, |
| 34 const NotificationSource& source, |
| 35 const NotificationDetails& details); |
| 36 |
| 37 RenderViewHost* render_view_host_; |
| 38 NotificationRegistrar registrar_; |
| 39 |
| 40 typedef std::map<RenderViewHost*, RenderViewDevToolsAgentHost*> Instances; |
| 41 static Instances instances_; |
| 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(RenderViewDevToolsAgentHost); |
| 44 }; |
| 45 |
| 46 #endif // CONTENT_BROWSER_DEBUGGER_RENDER_VIEW_DEVTOOLS_AGENT_HOST_H_ |
OLD | NEW |