"Web" prefix in Blink public APIs

29 views
Skip to first unread message

Kentaro Hara

unread,
Sep 23, 2020, 1:39:58 AM9/23/20
to platform-architecture-dev, Gyuyoung Kim
Hi

Currently we are adding the "Web" prefix to all classes / enums in blink/public/{platform, web}. However, the rule is not clear for blink/public/common/. Some classes / enums have the "Web" prefix but others don't.

Do we have any guidelines for it?

What happens if we make the "Web" prefix optional for the Blink public APIs? It won't cause any confusion because the classes / enums are prefixed with "blink::".

--
Kentaro Hara, Tokyo

Kinuko Yasuda

unread,
Sep 23, 2020, 2:30:53 AM9/23/20
to Kentaro Hara, platform-architecture-dev, Gyuyoung Kim
My opinion has been that at least for blink/public/common things do not need to have "Web" prefix unless it has other reasons (e.g. using the prefix is easier for handling naming or concept conflicts), and kept telling people no need to do so as well.  (README.md doesn't say it should either, while I realized it's not in other public directories either)

I agree that we probably don't need to be obliged to prefix with "Web" in other blink public directories (i.e. public/{platform,web}, while for existing classes they are probably just fine as is.


--
You received this message because you are subscribed to the Google Groups "platform-architecture-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architect...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CABg10jwtrpCMQaYyiEWCT9mN17M9MyweudMxaWepkGJGgEjs6g%40mail.gmail.com.

Matt Falkenhagen

unread,
Sep 23, 2020, 2:33:00 AM9/23/20
to Kinuko Yasuda, Kentaro Hara, platform-architecture-dev, Gyuyoung Kim
AgreeーI tend to view the Web* clases as a target for Onion Soup, so I'd prefer to disallow or discourage it in public/common. Most of the classes don't have it. I suppose sometimes it's needed to distinguish from an existing blink:: type, like blink::InputEvent and blink::WebInputEvent.

For public/{platform,web} it may be good to keep the guideline for internal consistency. We expect these to be removed with Onion Soup, is that right?

2020年9月23日(水) 15:30 Kinuko Yasuda <kin...@chromium.org>:

Kentaro Hara

unread,
Sep 23, 2020, 2:35:54 AM9/23/20
to Matt Falkenhagen, Kinuko Yasuda, platform-architecture-dev, Gyuyoung Kim
For public/{platform,web} it may be good to keep the guideline for internal consistency. We expect these to be removed with Onion Soup, is that right?

Not entirely. Classes used by //components/ etc will remain after Onion soup.

1) Don't need to use the "Web" prefix in the Blink public APIs (including platform/, web/ and common/).
2) Leave the existing "Web" prefix as is.

sounds like a reasonable guideline to me.


--
Kentaro Hara, Tokyo

Jeremy Roman

unread,
Sep 23, 2020, 1:48:29 PM9/23/20
to Kentaro Hara, Matt Falkenhagen, Kinuko Yasuda, platform-architecture-dev, Gyuyoung Kim
common/ certainly doesn't need it. public/{platform,web}...I'd lean toward keeping it for consistency but don't feel strongly.

dan...@chromium.org

unread,
Sep 23, 2020, 2:53:45 PM9/23/20
to Jeremy Roman, Kentaro Hara, Matt Falkenhagen, Kinuko Yasuda, platform-architecture-dev, Gyuyoung Kim
On Wed, Sep 23, 2020 at 1:48 PM Jeremy Roman <jbr...@chromium.org> wrote:
common/ certainly doesn't need it. public/{platform,web}...I'd lean toward keeping it for consistency but don't feel strongly.

Similar feeling from me. It may help explain layering for code inside blink, where the namespace is shared.
 

Kentaro Hara

unread,
Sep 25, 2020, 3:30:10 AM9/25/20
to Dana Jansens, Jeremy Roman, Matt Falkenhagen, Kinuko Yasuda, platform-architecture-dev, Gyuyoung Kim
Gyuyoung kindly added the guideline to blink/public/README.md. Thanks!


--
Kentaro Hara, Tokyo
Reply all
Reply to author
Forward
0 new messages