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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 virtual bool DetachClient(DevToolsAgentHostClient* client) = 0; | 121 virtual bool DetachClient(DevToolsAgentHostClient* client) = 0; |
122 | 122 |
123 // Returns true if there is a client attached. | 123 // Returns true if there is a client attached. |
124 virtual bool IsAttached() = 0; | 124 virtual bool IsAttached() = 0; |
125 | 125 |
126 // Sends |message| from |client| to the agent. | 126 // Sends |message| from |client| to the agent. |
127 // Returns true if the message is dispatched and handled. | 127 // Returns true if the message is dispatched and handled. |
128 virtual bool DispatchProtocolMessage(DevToolsAgentHostClient* client, | 128 virtual bool DispatchProtocolMessage(DevToolsAgentHostClient* client, |
129 const std::string& message) = 0; | 129 const std::string& message) = 0; |
130 | 130 |
131 // Starts inspecting element at position (|x|, |y|) in the specified page. | 131 // Starts inspecting element at position (|x|, |y|). |
132 virtual void InspectElement(int x, int y) = 0; | 132 virtual void InspectElement(DevToolsAgentHostClient* client, |
| 133 int x, |
| 134 int y) = 0; |
133 | 135 |
134 // Returns the unique id of the agent. | 136 // Returns the unique id of the agent. |
135 virtual std::string GetId() = 0; | 137 virtual std::string GetId() = 0; |
136 | 138 |
137 // Returns web contents instance for this host if any. | 139 // Returns web contents instance for this host if any. |
138 virtual WebContents* GetWebContents() = 0; | 140 virtual WebContents* GetWebContents() = 0; |
139 | 141 |
140 // Returns related browser context instance if available. | 142 // Returns related browser context instance if available. |
141 virtual BrowserContext* GetBrowserContext() = 0; | 143 virtual BrowserContext* GetBrowserContext() = 0; |
142 | 144 |
(...skipping 29 matching lines...) Expand all Loading... |
172 static void RemoveAgentStateCallback(const AgentStateCallback& callback); | 174 static void RemoveAgentStateCallback(const AgentStateCallback& callback); |
173 | 175 |
174 protected: | 176 protected: |
175 friend class base::RefCounted<DevToolsAgentHost>; | 177 friend class base::RefCounted<DevToolsAgentHost>; |
176 virtual ~DevToolsAgentHost() {} | 178 virtual ~DevToolsAgentHost() {} |
177 }; | 179 }; |
178 | 180 |
179 } // namespace content | 181 } // namespace content |
180 | 182 |
181 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ | 183 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ |
OLD | NEW |