Kentaro and I were chatting, and we both believe that having blink include directories from src/components is confusing.
The issue is that most components depend on blink, either directly or indirectly. Most devs think of components as one thing, so having blink include some of it is unintuitive.
There are only a few includes, per https://cs.chromium.org/search/?q=file:third_party/webkit+%22%23include+%5C%22components/%22+package:%5Echromium$&type=cs
1) components/variations/variations_associated_data.h
third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl_unittest.cc
this is actually just calling variations::testing::ClearAllVariationParams(); which is only a wrapper around base::FieldTrialParamAssociator::GetInstance()->ClearAllParamsForTesting();, so it's trivial
2) components/mime_util/mime_util.h
third_party/WebKit/Source/platform/network/mime/MIMETypeRegistry.cpp
third_party/WebKit/Source/platform/network/NetworkUtils.cpp
calls these methods:
bool IsSupportedImageMimeType(const std::string& mime_type)
bool IsSupportedNonImageMimeType(const std::string& mime_type)
bool IsSupportedJavascriptMimeType(const std::string& mime_type)
bool IsSupportedMimeType(const std::string& mime_type)
Looking at the implementation of these methods, this is list of image/script/html mime types that _Blink handles_. So it seems that the right place for this is Blink itself. Perhaps we should move this into a header that browser code is allowed to depend on, similar to https://cs.chromium.org/chromium/src/content/browser/DEPS?rcl=efbf364ce8d68dab5694f52e4ccc527d26281e44&l=65
3) components/link_header_util/link_header_util.h
third_party/WebKit/Source/platform/loader/LinkHeader.cpp
This was code moved from blink because we had code in the browser side service worker code which needed it. Can we move it to an inline header in blink, similar to 2?
4) components/webauth/authenticator.mojom-blink.h
third_party/WebKit/Source/modules/webauth/WebAuthentication.h
I see no reason why this mojom was added as a component instead of in webkit/public like other mojoms. Commented on https://codereview.chromium.org/2702653002
5) components/payments/mojom/payment_request.mojom-blink.h
components/payments/mojom/payment_app.mojom-blink.h
third_party/WebKit/Source/modules/payments/PaymentResponse.h
third_party/WebKit/Source/modules/payments/PaymentInstruments.h
third_party/WebKit/Source/modules/payments/PaymentManager.h
third_party/WebKit/Source/modules/payments/PaymentAddress.h
third_party/WebKit/Source/modules/payments/PaymentRequest.h
third_party/WebKit/Source/modules/payments/PaymentsValidators.h
third_party/WebKit/Source/modules/payments/PaymentTestHelper.h
The mojoms are included from blink, content/browser and chrome/browser per https://cs.chromium.org/search/?q=components/payments/mojom+-file:out+-file:components/payments&type=cs. I see no reason why this shouldn't just be in webkit/public like other mojoms. Commented on https://codereview.chromium.org/2811593009 and on the email thread.
Comment 1 by haraken@chromium.org
, Jun 13 2017