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

Unified Diff: headless/lib/browser/headless_web_contents_impl.h

Issue 2830753004: Pipe the devTools FrameId from blink into the browser for headless (Closed)
Patch Set: Rebased Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: headless/lib/browser/headless_web_contents_impl.h
diff --git a/headless/lib/browser/headless_web_contents_impl.h b/headless/lib/browser/headless_web_contents_impl.h
index e578e8aede79e69bde39ea96086563e463d7753d..3ea0c7887f3b637c245678c828b60b3ef5032205 100644
--- a/headless/lib/browser/headless_web_contents_impl.h
+++ b/headless/lib/browser/headless_web_contents_impl.h
@@ -100,6 +100,14 @@ class HEADLESS_EXPORT HeadlessWebContentsImpl
return window_tree_host_.get();
}
+ // Returns the devtools frame id corresponding to the |frame_tree_node_id|, if
+ // any. Note this relies on an IPC sent from blink during navigation.
+ std::string GetUntrustedDevToolsFrameIdForFrameTreeNodeId(
+ int process_id,
+ int frame_tree_node_id) const;
+
+ int GetMainFrameRenderProcessId() const;
+
private:
// Takes ownership of |web_contents|.
HeadlessWebContentsImpl(content::WebContents* web_contents,
@@ -121,6 +129,8 @@ class HEADLESS_EXPORT HeadlessWebContentsImpl
std::unique_ptr<HeadlessTabSocketImpl> headless_tab_socket_;
HeadlessBrowserContextImpl* browser_context_; // Not owned.
+ // TODO(alexclarke): With OOPIF there may be more than one renderer, we need
+ // to fix this. See crbug.com/715924
content::RenderProcessHost* render_process_host_; // Not owned.
using ObserverMap =
« no previous file with comments | « headless/lib/browser/headless_browser_context_impl.cc ('k') | headless/lib/browser/headless_web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698