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

Issue 1805983002: headless: Implement client API generation (Closed)

Created:
4 years, 9 months ago by Sami
Modified:
3 years, 8 months ago
Reviewers:
Lei Zhang, Nico, dgozman, altimin
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: Implement client API generation Implement a C++ client API which can be used to control and inspect a tab in the headless browser. The API consists of C++ bindings for the DevTools remote debugging protocol and is automatically generated from the protocol definition. Design doc: https://docs.google.com/document/d/1rlqcp8nk-ZQvldNJWdbaMbwfDbJoOXvahPCDoPGOwhQ/edit# BUG=595353 Committed: https://crrev.com/564a123cb9c2786db2b382a7f519cfbc65ae5e2f Cr-Commit-Position: refs/heads/master@{#388488}

Patch Set 1 #

Patch Set 2 : Snapshot. #

Patch Set 3 : Trying out protobufs. #

Patch Set 4 : Drop protos for now. #

Patch Set 5 : Client types header builds. #

Patch Set 6 : Client types impl snapshot. #

Patch Set 7 : Snapshot #

Patch Set 8 : Added some missing files #

Patch Set 9 : Parsing #

Patch Set 10 : Serialization works. #

Patch Set 11 : Client API generation WIP #

Patch Set 12 : Command parameter and result bindings. #

Patch Set 13 : Command dispatchers. #

Patch Set 14 : Cleanup #

Patch Set 15 : Command dispatching #

Patch Set 16 : Add user for client API #

Patch Set 17 : Include domain in methods #

Patch Set 18 : Rebased #

Patch Set 19 : Message reply dispatching #

Patch Set 20 : Per-domain headers. #

Patch Set 21 : Split out all domains #

Patch Set 22 : Generate code during build #

Patch Set 23 : DevTools client tests #

Patch Set 24 : More type testing -- arrays and objects WIP #

Patch Set 25 : Types work #

Patch Set 26 : Use enum classes #

Patch Set 27 : Documentation #

Total comments: 29

Patch Set 28 : Review comments. #

Patch Set 29 : Make PendingMessage moveable #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+2689 lines, -16 lines) Patch
M headless/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 6 chunks +176 lines, -0 lines 2 comments Download
M headless/README.md View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +5 lines, -1 line 0 comments Download
M headless/app/headless_shell.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 4 chunks +23 lines, -7 lines 0 comments Download
A headless/lib/browser/client_api_generator.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +372 lines, -0 lines 0 comments Download
A headless/lib/browser/client_api_generator_unittest.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +386 lines, -0 lines 0 comments Download
A headless/lib/browser/domain_cc.template View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +57 lines, -0 lines 0 comments Download
A headless/lib/browser/domain_h.template View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +77 lines, -0 lines 0 comments Download
A headless/lib/browser/headless_devtools_client_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +183 lines, -0 lines 0 comments Download
A headless/lib/browser/headless_devtools_client_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +308 lines, -0 lines 0 comments Download
M headless/lib/browser/headless_web_contents_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 5 chunks +12 lines, -2 lines 0 comments Download
M headless/lib/browser/headless_web_contents_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +21 lines, -1 line 0 comments Download
A headless/lib/browser/type_conversions_h.template View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +77 lines, -0 lines 0 comments Download
A headless/lib/browser/types_cc.template View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +130 lines, -0 lines 0 comments Download
A headless/lib/browser/types_h.template View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +158 lines, -0 lines 0 comments Download
A headless/lib/headless_devtools_client_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +100 lines, -0 lines 0 comments Download
A headless/public/domains/README.md View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +3 lines, -0 lines 0 comments Download
A headless/public/domains/types_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +200 lines, -0 lines 3 comments Download
A headless/public/headless_devtools_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +157 lines, -0 lines 0 comments Download
A headless/public/headless_devtools_target.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +37 lines, -0 lines 0 comments Download
M headless/public/headless_web_contents.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +11 lines, -5 lines 0 comments Download
A headless/public/internal/message_dispatcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +31 lines, -0 lines 0 comments Download
A headless/public/internal/value_conversions.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +163 lines, -0 lines 0 comments Download
M headless/public/util/maybe.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -0 lines 0 comments Download
M headless/test/headless_browser_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 34 (12 generated)
Sami
Snapshot
4 years, 9 months ago (2016-03-22 12:18:44 UTC) #1
Sami
Added some missing files
4 years, 9 months ago (2016-03-22 12:22:11 UTC) #2
Sami
Parsing
4 years, 9 months ago (2016-03-22 12:32:59 UTC) #3
Sami
PTAL, and let me know if you want me to split this up after all. ...
4 years, 8 months ago (2016-04-11 19:26:48 UTC) #7
altimin
https://codereview.chromium.org/1805983002/diff/520001/headless/app/headless_shell.cc File headless/app/headless_shell.cc (right): https://codereview.chromium.org/1805983002/diff/520001/headless/app/headless_shell.cc#newcode74 headless/app/headless_shell.cc:74: return; Unremoved debugging? https://codereview.chromium.org/1805983002/diff/520001/headless/lib/browser/client_api_generator.py File headless/lib/browser/client_api_generator.py (right): https://codereview.chromium.org/1805983002/diff/520001/headless/lib/browser/client_api_generator.py#newcode1 headless/lib/browser/client_api_generator.py:1: ...
4 years, 8 months ago (2016-04-14 12:54:12 UTC) #9
dgozman
https://codereview.chromium.org/1805983002/diff/520001/headless/lib/browser/domain_cc.template File headless/lib/browser/domain_cc.template (right): https://codereview.chromium.org/1805983002/diff/520001/headless/lib/browser/domain_cc.template#newcode46 headless/lib/browser/domain_cc.template:46: if (callback.Equals(base::Callback<void(std::unique_ptr<{{method_name}}Result>)>())) There is is_null() method on Callback. https://codereview.chromium.org/1805983002/diff/520001/headless/lib/browser/headless_devtools_client_impl.cc ...
4 years, 8 months ago (2016-04-14 18:01:54 UTC) #10
Sami
Thanks for reviewing my massive patch! https://codereview.chromium.org/1805983002/diff/520001/headless/app/headless_shell.cc File headless/app/headless_shell.cc (right): https://codereview.chromium.org/1805983002/diff/520001/headless/app/headless_shell.cc#newcode74 headless/app/headless_shell.cc:74: return; On 2016/04/14 ...
4 years, 8 months ago (2016-04-15 14:43:45 UTC) #11
dgozman
Overall, this looks good. Sorry, didn't really look into every single line of templates and ...
4 years, 8 months ago (2016-04-15 20:51:13 UTC) #12
Sami
On 2016/04/15 20:51:13, dgozman wrote: > Overall, this looks good. Sorry, didn't really look into ...
4 years, 8 months ago (2016-04-18 09:45:57 UTC) #13
altimin
lgtm
4 years, 8 months ago (2016-04-20 11:04:29 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1805983002/540001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1805983002/540001
4 years, 8 months ago (2016-04-20 11:09:15 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_chromeos_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_chromeos_rel/builds/175029)
4 years, 8 months ago (2016-04-20 11:33:19 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1805983002/560001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1805983002/560001
4 years, 8 months ago (2016-04-20 11:55:11 UTC) #21
commit-bot: I haz the power
Committed patchset #29 (id:560001)
4 years, 8 months ago (2016-04-20 13:45:28 UTC) #23
commit-bot: I haz the power
Patchset 29 (id:??) landed as https://crrev.com/564a123cb9c2786db2b382a7f519cfbc65ae5e2f Cr-Commit-Position: refs/heads/master@{#388488}
4 years, 8 months ago (2016-04-22 19:23:11 UTC) #25
Nico
https://codereview.chromium.org/1805983002/diff/560001/headless/BUILD.gn File headless/BUILD.gn (right): https://codereview.chromium.org/1805983002/diff/560001/headless/BUILD.gn#newcode292 headless/BUILD.gn:292: action("client_api_generator_tests") { 1) tests should run as part of ...
4 years, 2 months ago (2016-10-10 16:49:02 UTC) #27
Sami
https://codereview.chromium.org/1805983002/diff/560001/headless/BUILD.gn File headless/BUILD.gn (right): https://codereview.chromium.org/1805983002/diff/560001/headless/BUILD.gn#newcode292 headless/BUILD.gn:292: action("client_api_generator_tests") { On 2016/10/10 16:49:02, Nico wrote: > 1) ...
4 years, 2 months ago (2016-10-11 00:14:03 UTC) #28
Lei Zhang
So I got roped into reviewing a headless/ CL and now I'm looking around and ...
3 years, 8 months ago (2017-03-29 10:12:13 UTC) #30
Sami
On 2017/03/29 10:12:13, Lei Zhang wrote: > So I got roped into reviewing a headless/ ...
3 years, 8 months ago (2017-03-29 10:19:33 UTC) #31
Lei Zhang
On 2017/03/29 10:19:33, Sami wrote: > On 2017/03/29 10:12:13, Lei Zhang wrote: > > So ...
3 years, 8 months ago (2017-03-29 10:35:22 UTC) #32
Lei Zhang
BTW, some comments that still apply to ToT and is generally useful. https://codereview.chromium.org/1805983002/diff/560001/headless/public/domains/types_unittest.cc File headless/public/domains/types_unittest.cc ...
3 years, 8 months ago (2017-03-29 10:36:30 UTC) #33
Sami
3 years, 8 months ago (2017-03-29 10:41:41 UTC) #34
Message was sent while issue was closed.
On 2017/03/29 10:35:22, Lei Zhang wrote:
> Only the generated headers right? I didn't see any checked in files in present
> day code search that uses headless/public/internal.

That's right.

Powered by Google App Engine
This is Rietveld 408576698