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

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

Issue 2830753004: Pipe the devTools FrameId from blink into the browser for headless (Closed)
Patch Set: Changes for dgozman@ Created 3 years, 7 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 pair of |process_id| and
56 // |frame_tree_node_id|. This is sent by the renderer and shouldn't be fully
Charlie Reis 2017/04/26 19:52:55 nit: Remove extra space before "sent".
alex clarke (OOO till 29th) 2017/04/27 08:49:43 Done.
57 // trusted.
58 // TODO(alexclarke): Remove once there is a solution for stable frame IDs.
59 static std::string GetUntrustedDevToolsFrameIdForFrameTreeNodeId(
60 int process_id,
61 int frame_tree_node_id);
62
55 // Returns DevToolsAgentHost with a given |id| or nullptr of it doesn't exist. 63 // Returns DevToolsAgentHost with a given |id| or nullptr of it doesn't exist.
56 static scoped_refptr<DevToolsAgentHost> GetForId(const std::string& id); 64 static scoped_refptr<DevToolsAgentHost> GetForId(const std::string& id);
57 65
58 // Returns DevToolsAgentHost that can be used for inspecting |web_contents|. 66 // Returns DevToolsAgentHost that can be used for inspecting |web_contents|.
59 // A new DevToolsAgentHost will be created if it does not exist. 67 // A new DevToolsAgentHost will be created if it does not exist.
60 static scoped_refptr<DevToolsAgentHost> GetOrCreateFor( 68 static scoped_refptr<DevToolsAgentHost> GetOrCreateFor(
61 WebContents* web_contents); 69 WebContents* web_contents);
62 70
63 // Returns DevToolsAgentHost that can be used for inspecting |frame_host|. 71 // Returns DevToolsAgentHost that can be used for inspecting |frame_host|.
64 // A new DevToolsAgentHost will be created if it does not exist. 72 // A new DevToolsAgentHost will be created if it does not exist.
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 static void DetachAllClients(); 213 static void DetachAllClients();
206 214
207 protected: 215 protected:
208 friend class base::RefCounted<DevToolsAgentHost>; 216 friend class base::RefCounted<DevToolsAgentHost>;
209 virtual ~DevToolsAgentHost() {} 217 virtual ~DevToolsAgentHost() {}
210 }; 218 };
211 219
212 } // namespace content 220 } // namespace content
213 221
214 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ 222 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698