How does Chromium automatically generate the corresponding Blink files?

Skip to first unread message


Jun 12, 2024, 11:10:48 PMJun 12
to Chromium-dev
Hi, anyone. I have a question.

When I read chromium source code, I noticed some file like this one.

- - Chromium Code Search

It seems like these documents were automatically generated. 

For example:
// Named interceptors

I believe there is a source file here indicating that our flag is kOnlyInterceptStrings, and then the |chromium| generator program automatically generates such code.

So my questions are:

  1. What is the source file here?
  2. What is the generator program here? Where can I find them?


Ian Clelland

Jun 17, 2024, 9:59:11 AMJun 17
to, Chromium-dev
The top of the file includes the comment:

// DO NOT EDIT: This file is auto-generated by 
// //third_party/blink/renderer/bindings/scripts/

This is the generator for (among many others).

Chromium's build system is quite complex, but it is mostly expressed through the and *.gni files in the source tree.

You can usually use code search to track down most of what you're looking for: if you search for "", for instance, you can see that it's mentioned in the file third_party/blink/renderer/bindings/generated_in_core.gni, in a list named "generated_interface_sources_in_core". That can be traced back to third_party/blink/renderer/bindings/, which includes the build steps that call

As far as source files go, the bindings generator takes as its input all of the *.idl files in the source tree, and writes out the C++ code for these in .cc and .h files. In your case, the source file would have been third_party/blink/renderer/core/css/css_style_declaration.idl, and the code would have largely been written by third_party/blink/renderer/bindings/scripts/bind_gen/ (There are many other dependencies and files involved, but those two are the most directly related).

If you want to read up on how the bindings generation system works, is a good place to start.


Chromium Developers mailing list:
View archives, change email options, or unsubscribe:
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages