| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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_DEBUGGER_DEVTOOLS_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_DEBUGGER_DEVTOOLS_MANAGER_H_ |
| 6 #define CONTENT_BROWSER_DEBUGGER_DEVTOOLS_MANAGER_H_ | 6 #define CONTENT_BROWSER_DEBUGGER_DEVTOOLS_MANAGER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "content/browser/debugger/devtools_agent_host.h" | 12 #include "content/browser/debugger/devtools_agent_host.h" |
| 13 #include "content/browser/debugger/devtools_client_host.h" | 13 #include "content/browser/debugger/devtools_client_host.h" |
| 14 #include "content/common/content_export.h" |
| 14 | 15 |
| 15 namespace IPC { | 16 namespace IPC { |
| 16 class Message; | 17 class Message; |
| 17 } | 18 } |
| 18 | 19 |
| 19 class DevToolsAgentHost; | 20 class DevToolsAgentHost; |
| 20 class DevToolsNetLogObserver; | 21 class DevToolsNetLogObserver; |
| 21 class GURL; | 22 class GURL; |
| 22 class IOThread; | 23 class IOThread; |
| 23 class PrefService; | 24 class PrefService; |
| 24 class RenderViewHost; | 25 class RenderViewHost; |
| 25 class TabContents; | 26 class TabContents; |
| 26 | 27 |
| 27 typedef std::map<std::string, std::string> DevToolsRuntimeProperties; | 28 typedef std::map<std::string, std::string> DevToolsRuntimeProperties; |
| 28 | 29 |
| 29 // This class is a singleton that manages DevToolsClientHost instances and | 30 // This class is a singleton that manages DevToolsClientHost instances and |
| 30 // routes messages between developer tools clients and agents. | 31 // routes messages between developer tools clients and agents. |
| 31 // | 32 // |
| 32 // Methods below that accept inspected RenderViewHost as a parameter are | 33 // Methods below that accept inspected RenderViewHost as a parameter are |
| 33 // just convenience methods that call corresponding methods accepting | 34 // just convenience methods that call corresponding methods accepting |
| 34 // DevToolAgentHost. | 35 // DevToolAgentHost. |
| 35 class DevToolsManager : public DevToolsClientHost::CloseListener, | 36 class CONTENT_EXPORT DevToolsManager |
| 36 public DevToolsAgentHost::CloseListener { | 37 : public DevToolsClientHost::CloseListener, |
| 38 public DevToolsAgentHost::CloseListener { |
| 37 public: | 39 public: |
| 38 static DevToolsManager* GetInstance(); | 40 static DevToolsManager* GetInstance(); |
| 39 | 41 |
| 40 DevToolsManager(); | 42 DevToolsManager(); |
| 41 virtual ~DevToolsManager(); | 43 virtual ~DevToolsManager(); |
| 42 | 44 |
| 43 // Returns DevToolsClientHost registered for |inspected_rvh| or NULL if | 45 // Returns DevToolsClientHost registered for |inspected_rvh| or NULL if |
| 44 // there is no alive DevToolsClientHost registered for |inspected_rvh|. | 46 // there is no alive DevToolsClientHost registered for |inspected_rvh|. |
| 45 DevToolsClientHost* GetDevToolsClientHostFor(RenderViewHost* inspected_rvh); | 47 DevToolsClientHost* GetDevToolsClientHostFor(RenderViewHost* inspected_rvh); |
| 46 | 48 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 typedef std::map<int, | 131 typedef std::map<int, |
| 130 std::pair<DevToolsClientHost*, DevToolsRuntimeProperties> > | 132 std::pair<DevToolsClientHost*, DevToolsRuntimeProperties> > |
| 131 OrphanClientHosts; | 133 OrphanClientHosts; |
| 132 OrphanClientHosts orphan_client_hosts_; | 134 OrphanClientHosts orphan_client_hosts_; |
| 133 int last_orphan_cookie_; | 135 int last_orphan_cookie_; |
| 134 | 136 |
| 135 DISALLOW_COPY_AND_ASSIGN(DevToolsManager); | 137 DISALLOW_COPY_AND_ASSIGN(DevToolsManager); |
| 136 }; | 138 }; |
| 137 | 139 |
| 138 #endif // CONTENT_BROWSER_DEBUGGER_DEVTOOLS_MANAGER_H_ | 140 #endif // CONTENT_BROWSER_DEBUGGER_DEVTOOLS_MANAGER_H_ |
| OLD | NEW |