| 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 static DevToolsAgentHost* CreateFor(RenderViewHost*); | |
| 23 | |
| 24 private: | |
| 25 RenderViewDevToolsAgentHost(RenderViewHost*); | |
| 26 virtual ~RenderViewDevToolsAgentHost(); | |
| 27 | |
| 28 // DevToolsAgentHost implementation. | |
| 29 virtual void SendMessageToAgent(IPC::Message* msg); | |
| 30 virtual void NotifyClientClosing(); | |
| 31 virtual void ClientDetached(); | |
| 32 | |
| 33 // Overridden from NotificationObserver: | |
| 34 virtual void Observe(int type, | |
| 35 const NotificationSource& source, | |
| 36 const NotificationDetails& details); | |
| 37 | |
| 38 RenderViewHost* render_view_host_; | |
| 39 NotificationRegistrar registrar_; | |
| 40 | |
| 41 typedef std::map<RenderViewHost*, RenderViewDevToolsAgentHost*> Instances; | |
| 42 static Instances instances_; | |
| 43 | |
| 44 DISALLOW_COPY_AND_ASSIGN(RenderViewDevToolsAgentHost); | |
| 45 }; | |
| 46 | |
| 47 #endif // CONTENT_BROWSER_DEBUGGER_RENDER_VIEW_DEVTOOLS_AGENT_HOST_H_ | |
| OLD | NEW |