Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: content/public/browser/devtools_agent_host.h

Issue 2361613002: DevTools: untangle device discovery request from the devtools android bridge. (Closed)
Patch Set: make device hosts profile-independent, plump browser context for inspect. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 // Returns url associated with agent host. 180 // Returns url associated with agent host.
181 virtual GURL GetURL() = 0; 181 virtual GURL GetURL() = 0;
182 182
183 // Returns the favicon url for this host. 183 // Returns the favicon url for this host.
184 virtual GURL GetFaviconURL() = 0; 184 virtual GURL GetFaviconURL() = 0;
185 185
186 // Activates agent host. Returns false if the operation failed. 186 // Activates agent host. Returns false if the operation failed.
187 virtual bool Activate() = 0; 187 virtual bool Activate() = 0;
188 188
189 // Opens devtools for this agent host. Returns false if the operation failed. 189 // Opens devtools for this agent host. Returns false if the operation failed.
190 virtual bool Inspect() = 0; 190 // If own context is null, uses |context| to open devtools
dgozman 2016/09/22 17:13:59 This should be enforced in content rather than in
191 // window in.
192 virtual bool Inspect(BrowserContext* context) = 0;
191 193
192 // Reloads the host. 194 // Reloads the host.
193 virtual void Reload() = 0; 195 virtual void Reload() = 0;
194 196
195 // Closes agent host. Returns false if the operation failed. 197 // Closes agent host. Returns false if the operation failed.
196 virtual bool Close() = 0; 198 virtual bool Close() = 0;
197 199
198 // Returns the time when the host was last active. 200 // Returns the time when the host was last active.
199 virtual base::TimeTicks GetLastActivityTime() = 0; 201 virtual base::TimeTicks GetLastActivityTime() = 0;
200 202
201 // Terminates all debugging sessions and detaches all clients. 203 // Terminates all debugging sessions and detaches all clients.
202 static void DetachAllClients(); 204 static void DetachAllClients();
203 205
204 typedef base::Callback<void(DevToolsAgentHost*, bool attached)> 206 typedef base::Callback<void(DevToolsAgentHost*, bool attached)>
205 AgentStateCallback; 207 AgentStateCallback;
206 208
207 static void AddAgentStateCallback(const AgentStateCallback& callback); 209 static void AddAgentStateCallback(const AgentStateCallback& callback);
208 static void RemoveAgentStateCallback(const AgentStateCallback& callback); 210 static void RemoveAgentStateCallback(const AgentStateCallback& callback);
209 211
210 protected: 212 protected:
211 friend class base::RefCounted<DevToolsAgentHost>; 213 friend class base::RefCounted<DevToolsAgentHost>;
212 virtual ~DevToolsAgentHost() {} 214 virtual ~DevToolsAgentHost() {}
213 }; 215 };
214 216
215 } // namespace content 217 } // namespace content
216 218
217 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ 219 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698