| 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_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 static char kTypeExternal[]; | 45 static char kTypeExternal[]; |
| 46 static char kTypeBrowser[]; | 46 static char kTypeBrowser[]; |
| 47 static char kTypeOther[]; | 47 static char kTypeOther[]; |
| 48 | 48 |
| 49 // Latest DevTools protocol version supported. | 49 // Latest DevTools protocol version supported. |
| 50 static std::string GetProtocolVersion(); | 50 static std::string GetProtocolVersion(); |
| 51 | 51 |
| 52 // Returns whether particular version of DevTools protocol is supported. | 52 // Returns whether particular version of DevTools protocol is supported. |
| 53 static bool IsSupportedProtocolVersion(const std::string& version); | 53 static bool IsSupportedProtocolVersion(const std::string& version); |
| 54 | 54 |
| 55 // Returns the DevTools FrameId for the given |frame_tree_node_id|. |
| 56 static std::string GetDevToolsFrameIdForFrameTreeNodeId( |
| 57 int frame_tree_node_id); |
| 58 |
| 55 // Returns DevToolsAgentHost with a given |id| or nullptr of it doesn't exist. | 59 // Returns DevToolsAgentHost with a given |id| or nullptr of it doesn't exist. |
| 56 static scoped_refptr<DevToolsAgentHost> GetForId(const std::string& id); | 60 static scoped_refptr<DevToolsAgentHost> GetForId(const std::string& id); |
| 57 | 61 |
| 58 // Returns DevToolsAgentHost that can be used for inspecting |web_contents|. | 62 // Returns DevToolsAgentHost that can be used for inspecting |web_contents|. |
| 59 // A new DevToolsAgentHost will be created if it does not exist. | 63 // A new DevToolsAgentHost will be created if it does not exist. |
| 60 static scoped_refptr<DevToolsAgentHost> GetOrCreateFor( | 64 static scoped_refptr<DevToolsAgentHost> GetOrCreateFor( |
| 61 WebContents* web_contents); | 65 WebContents* web_contents); |
| 62 | 66 |
| 63 // Returns DevToolsAgentHost that can be used for inspecting |frame_host|. | 67 // Returns DevToolsAgentHost that can be used for inspecting |frame_host|. |
| 64 // A new DevToolsAgentHost will be created if it does not exist. | 68 // A new DevToolsAgentHost will be created if it does not exist. |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 static void DetachAllClients(); | 214 static void DetachAllClients(); |
| 211 | 215 |
| 212 protected: | 216 protected: |
| 213 friend class base::RefCounted<DevToolsAgentHost>; | 217 friend class base::RefCounted<DevToolsAgentHost>; |
| 214 virtual ~DevToolsAgentHost() {} | 218 virtual ~DevToolsAgentHost() {} |
| 215 }; | 219 }; |
| 216 | 220 |
| 217 } // namespace content | 221 } // namespace content |
| 218 | 222 |
| 219 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ | 223 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ |
| OLD | NEW |