Commit d3cd5999 authored by Kenichi Ishibashi's avatar Kenichi Ishibashi Committed by Commit Bot

Move some service worker mojoms out of monolithic platform

The following service worker related mojom in blink will be used
from both //content and //components/services/storage when we move
ServiceWorkerStorage to the Storage Service:
* navigation_preload_state.mojm
* service_worker_database.mojom
* service_worker_registration_options.mojom

As described in crrev.com/c/1920008, putting these mojom in
the mojom_platform target causes some problems when we try to use them
from //components/services/storage. This CL gives them their own
mojom target the same way crrev.com/c/1920008 did.

These mojom files depend on web_feature.mojom and script_type.mojom.
web_feature.mojom has it own target. This CL also gives
script_type.mojom it own target.

Bug: 1016064
Change-Id: I75123c67c6be18060f9eda09f448a0107cfb598d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2395197Reviewed-by: default avatarMakoto Shimazu <shimazu@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Kenichi Ishibashi <bashi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#805581}
parent 778a1f2f
......@@ -137,7 +137,6 @@ mojom("mojom_platform") {
"renderer_preferences.mojom",
"reporting/reporting.mojom",
"screen_enumeration/screen_enumeration.mojom",
"script/script_type.mojom",
"scroll/scroll_enums.mojom",
"scroll/scroll_into_view_params.mojom",
"scroll/scrollbar_mode.mojom",
......@@ -145,15 +144,12 @@ mojom("mojom_platform") {
"selection_menu/selection_menu_behavior.mojom",
"service_worker/controller_service_worker_mode.mojom",
"service_worker/dispatch_fetch_event_params.mojom",
"service_worker/navigation_preload_state.mojom",
"service_worker/service_worker_client.mojom",
"service_worker/service_worker_container_type.mojom",
"service_worker/service_worker_database.mojom",
"service_worker/service_worker_error_type.mojom",
"service_worker/service_worker_event_status.mojom",
"service_worker/service_worker_fetch_response_callback.mojom",
"service_worker/service_worker_installed_scripts_manager.mojom",
"service_worker/service_worker_registration_options.mojom",
"service_worker/service_worker_state.mojom",
"service_worker/service_worker_stream_handle.mojom",
"site_engagement/site_engagement.mojom",
......@@ -205,6 +201,7 @@ mojom("mojom_platform") {
":android_mojo_bindings",
":authenticator_test_mojo_bindings",
":mojom_mhtml_load_result",
":script_type_mojo_bindings",
":web_feature_mojo_bindings",
"//cc/mojom",
"//components/payments/mojom",
......@@ -223,6 +220,7 @@ mojom("mojom_platform") {
"//third_party/blink/public/mojom/dom_storage",
"//third_party/blink/public/mojom/frame",
"//third_party/blink/public/mojom/gpu",
"//third_party/blink/public/mojom/service_worker:storage",
"//third_party/blink/public/mojom/tokens",
"//third_party/blink/public/mojom/usb",
"//ui/base/cursor/mojom",
......@@ -719,6 +717,7 @@ mojom("mojom_core") {
public_deps = [
":android_mojo_bindings",
":mojom_platform",
":script_type_mojo_bindings",
":web_feature_mojo_bindings",
"//cc/mojom",
"//components/payments/mojom",
......@@ -726,6 +725,7 @@ mojom("mojom_core") {
"//services/network/public/mojom",
"//services/service_manager/public/mojom",
"//skia/public/mojom",
"//third_party/blink/public/mojom/service_worker:storage",
"//ui/gfx/geometry/mojom",
"//url/mojom:url_mojom_gurl",
"//url/mojom:url_mojom_origin",
......@@ -829,6 +829,7 @@ mojom("mojom_core") {
":android_mojo_bindings",
":mojom_platform",
"//services/network/public/mojom",
"//third_party/blink/public/mojom/service_worker:storage",
]
component_deps_blink = [ "//third_party/blink/renderer/platform" ]
......@@ -1072,6 +1073,18 @@ mojom("mojom_mhtml_load_result") {
export_header = "third_party/blink/public/common/common_export.h"
}
mojom_component("script_type_mojo_bindings") {
generate_java = true
sources = [ "script/script_type.mojom" ]
macro_prefix = "SCRIPT_TYPE_MOJOM"
output_prefix = "script_type_mojom"
export_class_attribute_blink = "PLATFORM_EXPORT"
export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
export_header_blink = "third_party/blink/renderer/platform/platform_export.h"
}
# The web_feature_mojo_bindings is separated from the rest of the mojom files
# because the chromium typemap for blink mojo_bindings has private content
# dependencies.
......
# Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//mojo/public/tools/bindings/mojom.gni")
# TODO(crbug.com/1026488): Consider moving all service worker mojom files into
# this BUILD.gn and figure out right dependencies for them. Currently mojom
# files other than "storage" target are listed in blink/public/mojom/BUILD.gn.
# This is separated from the rest of the other service worker mojom files
# to avoid introducing a dependency on the entire public blink platform for
# non-blink dependents.
mojom_component("storage") {
output_prefix = "service_worker_storage_mojom"
macro_prefix = "SERVICE_WORKER_STORAGE_MOJOM"
sources = [
"navigation_preload_state.mojom",
"service_worker_database.mojom",
"service_worker_registration_options.mojom",
]
public_deps = [
"//third_party/blink/public/mojom:script_type_mojo_bindings",
"//third_party/blink/public/mojom:web_feature_mojo_bindings",
"//url/mojom:url_mojom_gurl",
]
export_class_attribute_blink = "PLATFORM_EXPORT"
export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
export_header_blink = "third_party/blink/renderer/platform/platform_export.h"
generate_java = true
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment