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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 static std::string DisconnectRenderViewHost(RenderViewHost* rvh); | 45 static std::string DisconnectRenderViewHost(RenderViewHost* rvh); |
46 | 46 |
47 // Reattaches agent host detached with DisconnectRenderViewHost method above | 47 // Reattaches agent host detached with DisconnectRenderViewHost method above |
48 // to |rvh|. | 48 // to |rvh|. |
49 static void ConnectRenderViewHost(const std::string& agent_host_cookie, | 49 static void ConnectRenderViewHost(const std::string& agent_host_cookie, |
50 RenderViewHost* rvh); | 50 RenderViewHost* rvh); |
51 | 51 |
52 // Returns a list of all existing RenderViewHost's that can be debugged. | 52 // Returns a list of all existing RenderViewHost's that can be debugged. |
53 static std::vector<RenderViewHost*> GetValidRenderViewHosts(); | 53 static std::vector<RenderViewHost*> GetValidRenderViewHosts(); |
54 | 54 |
| 55 // Returns true if there is a client attached. |
| 56 virtual bool IsAttached() = 0; |
| 57 |
55 // Starts inspecting element at position (|x|, |y|) in the specified page. | 58 // Starts inspecting element at position (|x|, |y|) in the specified page. |
56 virtual void InspectElement(int x, int y) = 0; | 59 virtual void InspectElement(int x, int y) = 0; |
57 | 60 |
58 // Returns the unique id of the agent. | 61 // Returns the unique id of the agent. |
59 virtual std::string GetId() = 0; | 62 virtual std::string GetId() = 0; |
60 | 63 |
61 // Returns render view host instance for this host if any. | 64 // Returns render view host instance for this host if any. |
62 virtual RenderViewHost* GetRenderViewHost() = 0; | 65 virtual RenderViewHost* GetRenderViewHost() = 0; |
63 | 66 |
64 protected: | 67 protected: |
65 friend class base::RefCounted<DevToolsAgentHost>; | 68 friend class base::RefCounted<DevToolsAgentHost>; |
66 virtual ~DevToolsAgentHost() {} | 69 virtual ~DevToolsAgentHost() {} |
67 }; | 70 }; |
68 | 71 |
69 } // namespace content | 72 } // namespace content |
70 | 73 |
71 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ | 74 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ |
OLD | NEW |