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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 74 |
75 // Client attaches to this agent host to start debugging it. | 75 // Client attaches to this agent host to start debugging it. |
76 virtual void AttachClient(DevToolsAgentHostClient* client) = 0; | 76 virtual void AttachClient(DevToolsAgentHostClient* client) = 0; |
77 | 77 |
78 // Already attached client detaches from this agent host to stop debugging it. | 78 // Already attached client detaches from this agent host to stop debugging it. |
79 virtual void DetachClient() = 0; | 79 virtual void DetachClient() = 0; |
80 | 80 |
81 // Returns true if there is a client attached. | 81 // Returns true if there is a client attached. |
82 virtual bool IsAttached() = 0; | 82 virtual bool IsAttached() = 0; |
83 | 83 |
84 // Sends a message to the agent. | 84 // Sends a message to the agent. Returns true if the message is handled. |
85 virtual void DispatchProtocolMessage(const std::string& message) = 0; | 85 virtual bool DispatchProtocolMessage(const std::string& message) = 0; |
86 | 86 |
87 // Starts inspecting element at position (|x|, |y|) in the specified page. | 87 // Starts inspecting element at position (|x|, |y|) in the specified page. |
88 virtual void InspectElement(int x, int y) = 0; | 88 virtual void InspectElement(int x, int y) = 0; |
89 | 89 |
90 // Returns the unique id of the agent. | 90 // Returns the unique id of the agent. |
91 virtual std::string GetId() = 0; | 91 virtual std::string GetId() = 0; |
92 | 92 |
93 // Returns web contents instance for this host if any. | 93 // Returns web contents instance for this host if any. |
94 virtual WebContents* GetWebContents() = 0; | 94 virtual WebContents* GetWebContents() = 0; |
95 | 95 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 static void RemoveAgentStateCallback(const AgentStateCallback& callback); | 131 static void RemoveAgentStateCallback(const AgentStateCallback& callback); |
132 | 132 |
133 protected: | 133 protected: |
134 friend class base::RefCounted<DevToolsAgentHost>; | 134 friend class base::RefCounted<DevToolsAgentHost>; |
135 virtual ~DevToolsAgentHost() {} | 135 virtual ~DevToolsAgentHost() {} |
136 }; | 136 }; |
137 | 137 |
138 } // namespace content | 138 } // namespace content |
139 | 139 |
140 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ | 140 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ |
OLD | NEW |