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

Issue 1674263002: headless: Initial headless embedder API implementation (Closed)

Created:
4 years, 10 months ago by Sami
Modified:
4 years, 10 months ago
CC:
chromium-reviews, pfeldman, devtools-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

headless: Initial headless embedder API implementation This patch introduces the initial headless embedder API implementation. It allows the embedder to initialize a headless browsing environment and to navigate to a URL. We also add a headless shell application to demonstrate the use of the embedder API. Adapted from a patch by Alexander Timin <altimin@chromium.org>; BUG=546953 Committed: https://crrev.com/fe11616891b5f57ea977c24efdf7946ed2cbf5f7 Cr-Commit-Position: refs/heads/master@{#377973}

Patch Set 1 #

Patch Set 2 : Cleanup (WIP). #

Patch Set 3 : More cleanup. #

Patch Set 4 : Add headless browser tests. #

Patch Set 5 : Added navigation test. #

Total comments: 20

Patch Set 6 : Remove provisional client API for now. #

Total comments: 26

Patch Set 7 : Review comments. #

Total comments: 16

Patch Set 8 : Review comments. #

Patch Set 9 : Minor cleanup. #

Patch Set 10 : Adjusted DEPS. #

Total comments: 2

Patch Set 11 : Reorganization. #

Patch Set 12 : Add pak file generation. #

Total comments: 38

Patch Set 13 : Review comments. #

Patch Set 14 : Fix shutdown memory leak. #

Total comments: 32

Patch Set 15 : Rebased. #

Patch Set 16 : Review comments. #

Patch Set 17 : Fine, no console logging Mr. Presubmit. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1888 lines, -404 lines) Patch
M BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +7 lines, -0 lines 0 comments Download
M headless/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +113 lines, -3 lines 0 comments Download
A headless/DEPS View 1 2 3 4 5 6 7 8 9 10 1 chunk +10 lines, -0 lines 0 comments Download
A headless/README.md View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +59 lines, -0 lines 0 comments Download
A headless/app/headless_shell.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +103 lines, -0 lines 0 comments Download
A + headless/lib/browser/DEPS View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
A + headless/lib/browser/headless_browser_context.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +23 lines, -28 lines 0 comments Download
A headless/lib/browser/headless_browser_context.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +163 lines, -0 lines 0 comments Download
A headless/lib/browser/headless_browser_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +58 lines, -0 lines 0 comments Download
A headless/lib/browser/headless_browser_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +93 lines, -0 lines 0 comments Download
A headless/lib/browser/headless_browser_main_parts.h View 1 2 3 4 5 6 1 chunk +42 lines, -0 lines 0 comments Download
A headless/lib/browser/headless_browser_main_parts.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +54 lines, -0 lines 0 comments Download
A headless/lib/browser/headless_content_browser_client.h View 1 2 3 4 5 6 7 1 chunk +39 lines, -0 lines 0 comments Download
A headless/lib/browser/headless_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +51 lines, -0 lines 0 comments Download
A headless/lib/browser/headless_devtools.h View 1 2 3 4 5 6 7 1 chunk +24 lines, -0 lines 0 comments Download
A headless/lib/browser/headless_devtools.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +102 lines, -0 lines 0 comments Download
A + headless/lib/browser/headless_screen.h View 1 2 4 chunks +16 lines, -18 lines 0 comments Download
A + headless/lib/browser/headless_screen.cc View 1 2 8 chunks +37 lines, -41 lines 0 comments Download
A + headless/lib/browser/headless_url_request_context_getter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +23 lines, -22 lines 0 comments Download
A + headless/lib/browser/headless_url_request_context_getter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 chunks +38 lines, -42 lines 0 comments Download
A headless/lib/browser/headless_web_contents_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +60 lines, -0 lines 0 comments Download
A headless/lib/browser/headless_web_contents_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +104 lines, -0 lines 0 comments Download
A headless/lib/headless_browser_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +22 lines, -0 lines 0 comments Download
A headless/lib/headless_content_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +36 lines, -0 lines 0 comments Download
A headless/lib/headless_content_client.cc View 1 2 1 chunk +42 lines, -0 lines 0 comments Download
A headless/lib/headless_content_main_delegate.h View 1 2 3 4 5 6 7 1 chunk +62 lines, -0 lines 0 comments Download
A headless/lib/headless_content_main_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +124 lines, -0 lines 0 comments Download
A headless/lib/headless_web_contents_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +58 lines, -0 lines 0 comments Download
A headless/lib/renderer/headless_content_renderer_client.h View 1 2 3 4 5 6 1 chunk +22 lines, -0 lines 0 comments Download
A headless/lib/renderer/headless_content_renderer_client.cc View 1 chunk +13 lines, -0 lines 0 comments Download
A headless/lib/utility/headless_content_utility_client.h View 1 2 3 4 5 6 1 chunk +22 lines, -0 lines 0 comments Download
A headless/lib/utility/headless_content_utility_client.cc View 1 chunk +13 lines, -0 lines 0 comments Download
M headless/public/headless_browser.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +34 lines, -45 lines 0 comments Download
M headless/public/headless_browser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +15 lines, -6 lines 0 comments Download
A headless/public/headless_web_contents.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +53 lines, -0 lines 0 comments Download
D headless/public/network.h View 1 chunk +0 lines, -36 lines 0 comments Download
D headless/public/web_contents.h View 1 chunk +0 lines, -99 lines 0 comments Download
D headless/public/web_frame.h View 1 chunk +0 lines, -63 lines 0 comments Download
A headless/test/data/hello.html View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
A headless/test/headless_browser_test.h View 1 2 3 4 1 chunk +34 lines, -0 lines 0 comments Download
A headless/test/headless_browser_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +50 lines, -0 lines 0 comments Download
A headless/test/headless_test_launcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +66 lines, -0 lines 0 comments Download

Messages

Total messages: 44 (14 generated)
Sami
PTAL, all comments welcome.
4 years, 10 months ago (2016-02-09 18:54:30 UTC) #3
pfeldman
I pasted links to the remote debugging analogs of what you expose. I was hoping ...
4 years, 10 months ago (2016-02-09 19:49:52 UTC) #5
Sami
Pavel and I had a chat and I think we're on the same page: we ...
4 years, 10 months ago (2016-02-09 21:40:52 UTC) #6
alex clarke (OOO till 29th)
Overall looks good https://codereview.chromium.org/1674263002/diff/100001/headless/app/headless_shell.cc File headless/app/headless_shell.cc (right): https://codereview.chromium.org/1674263002/diff/100001/headless/app/headless_shell.cc#newcode57 headless/app/headless_shell.cc:57: HeadlessBrowser* browser_; Please document ownership of ...
4 years, 10 months ago (2016-02-10 13:20:34 UTC) #7
Sami
Thanks, all addressed. https://codereview.chromium.org/1674263002/diff/100001/headless/app/headless_shell.cc File headless/app/headless_shell.cc (right): https://codereview.chromium.org/1674263002/diff/100001/headless/app/headless_shell.cc#newcode57 headless/app/headless_shell.cc:57: HeadlessBrowser* browser_; On 2016/02/10 13:20:33, alexclarke1 ...
4 years, 10 months ago (2016-02-10 16:43:33 UTC) #8
alex clarke (OOO till 29th)
https://codereview.chromium.org/1674263002/diff/120001/headless/lib/browser/headless_content_browser_client.h File headless/lib/browser/headless_content_browser_client.h (right): https://codereview.chromium.org/1674263002/diff/120001/headless/lib/browser/headless_content_browser_client.h#newcode29 headless/lib/browser/headless_content_browser_client.h:29: HeadlessBrowserContext* browser_context(); can this be const? https://codereview.chromium.org/1674263002/diff/120001/headless/lib/browser/headless_devtools.cc File headless/lib/browser/headless_devtools.cc ...
4 years, 10 months ago (2016-02-10 17:49:22 UTC) #9
Sami
https://codereview.chromium.org/1674263002/diff/120001/headless/lib/browser/headless_content_browser_client.h File headless/lib/browser/headless_content_browser_client.h (right): https://codereview.chromium.org/1674263002/diff/120001/headless/lib/browser/headless_content_browser_client.h#newcode29 headless/lib/browser/headless_content_browser_client.h:29: HeadlessBrowserContext* browser_context(); On 2016/02/10 17:49:22, alexclarke1 wrote: > can ...
4 years, 10 months ago (2016-02-10 18:47:38 UTC) #10
Sami
4 years, 10 months ago (2016-02-10 18:47:39 UTC) #11
alex clarke (OOO till 29th)
lgtm
4 years, 10 months ago (2016-02-11 15:16:32 UTC) #13
Sami
Thanks Alex. Adding some owners: - dpranke@: BUILD.gn Approvals for new DEPS: - sievers@: content/public/ ...
4 years, 10 months ago (2016-02-11 18:25:06 UTC) #16
no sievers
On 2016/02/11 18:25:06, Sami wrote: > Thanks Alex. Adding some owners: > > - dpranke@: ...
4 years, 10 months ago (2016-02-11 18:34:56 UTC) #17
Sami
On 2016/02/11 18:34:56, sievers wrote: > > - sievers@: content/public/ > > no changes here ...
4 years, 10 months ago (2016-02-11 18:37:08 UTC) #18
no sievers
On 2016/02/11 18:37:08, Sami wrote: > On 2016/02/11 18:34:56, sievers wrote: > > > - ...
4 years, 10 months ago (2016-02-11 18:40:02 UTC) #19
sadrul
I was going to comment that it'd be good to add ui/aura DEPS to lib/browser/, ...
4 years, 10 months ago (2016-02-11 19:04:17 UTC) #20
Dirk Pranke
lgtm. exciting!
4 years, 10 months ago (2016-02-11 21:44:13 UTC) #21
Sami
On 2016/02/11 19:04:17, sadrul wrote: > I was going to comment that it'd be good ...
4 years, 10 months ago (2016-02-12 12:25:08 UTC) #22
sadrul
Cool! Thanks lgtm
4 years, 10 months ago (2016-02-12 19:09:30 UTC) #23
agl
I'm not a great reviewer for this because it plays with several bits of the ...
4 years, 10 months ago (2016-02-12 19:56:42 UTC) #24
Sami
On 2016/02/12 19:56:42, agl wrote: > I'm not a great reviewer for this because it ...
4 years, 10 months ago (2016-02-15 12:39:08 UTC) #25
Ryan Sleevi
This code is quite difficult to review. I do not feel confident that I can ...
4 years, 10 months ago (2016-02-22 21:11:13 UTC) #27
Ryan Sleevi
Another set of review feedback, after trying to page in more of the context. https://codereview.chromium.org/1674263002/diff/220001/headless/app/headless_shell.cc ...
4 years, 10 months ago (2016-02-22 22:01:22 UTC) #28
Sami
Thanks for the detailed review and helpful comments Ryan. I've removed the network customization API ...
4 years, 10 months ago (2016-02-23 20:19:08 UTC) #29
Ryan Sleevi
The size is greatly reduced, and I greatly appreciate that. I've left a few remarks ...
4 years, 10 months ago (2016-02-25 22:04:37 UTC) #30
Sami
Thanks again, all addressed. https://codereview.chromium.org/1674263002/diff/260001/headless/app/headless_shell.cc File headless/app/headless_shell.cc (right): https://codereview.chromium.org/1674263002/diff/260001/headless/app/headless_shell.cc#newcode42 headless/app/headless_shell.cc:42: const char kDefaultUrl[] = "https://google.com"; ...
4 years, 10 months ago (2016-02-26 18:49:17 UTC) #31
pfeldman
lgtm
4 years, 10 months ago (2016-02-26 18:55:16 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1674263002/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1674263002/300001
4 years, 10 months ago (2016-02-26 19:13:34 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/150829)
4 years, 10 months ago (2016-02-26 19:40:04 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1674263002/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1674263002/320001
4 years, 10 months ago (2016-02-26 19:53:07 UTC) #40
commit-bot: I haz the power
Committed patchset #17 (id:320001)
4 years, 10 months ago (2016-02-26 20:53:42 UTC) #42
commit-bot: I haz the power
4 years, 10 months ago (2016-02-26 20:59:38 UTC) #44
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/fe11616891b5f57ea977c24efdf7946ed2cbf5f7
Cr-Commit-Position: refs/heads/master@{#377973}

Powered by Google App Engine
This is Rietveld 408576698