Skip to content

Commit

Permalink
Revert "OnionSoup: Move web_bluetooth.mojom to public/mojom/bluetooth"
Browse files Browse the repository at this point in the history
This reverts commit d5b0082.

Reason for revert: Breaks compilation.
../../content/public/common/web_preferences.h:18:10: fatal error: 'third_party/blink/public/mojom/v8_cache_options.mojom.h' file not found
#include "third_party/blink/public/mojom/v8_cache_options.mojom.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Original change's description:
> OnionSoup: Move web_bluetooth.mojom to public/mojom/bluetooth
> 
> This CL moves bluetooth folder from public/platform/modules to
> public/mojom/ to gather mojom files to mojom folder with
> creating web_bluetooth_mojo_bindings.
> 
> Bug: 919393
> Change-Id: I42037e1c9738b03969e927dd00f6b24c2873b364
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1530369
> Reviewed-by: Kentaro Hara <haraken@chromium.org>
> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
> Reviewed-by: John Budorick <jbudorick@chromium.org>
> Reviewed-by: Doug Turner <dougt@chromium.org>
> Reviewed-by: Colin Blundell <blundell@chromium.org>
> Commit-Queue: Julie Jeongeun Kim <jkim@igalia.com>
> Cr-Commit-Position: refs/heads/master@{#649061}

TBR=kinuko@chromium.org,blundell@chromium.org,haraken@chromium.org,jbudorick@chromium.org,dougt@chromium.org,hnakashima@chromium.org,jkim@igalia.com

Change-Id: I0ebd0abd67e8ed975cb2f517800296493cdda513
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 919393
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1559180
Reviewed-by: Dominic Battré <battre@chromium.org>
Commit-Queue: Dominic Battré <battre@chromium.org>
Cr-Commit-Position: refs/heads/master@{#649068}
  • Loading branch information
Dominic Battré authored and Commit Bot committed Apr 9, 2019
1 parent b6e5403 commit e1e8c39
Show file tree
Hide file tree
Showing 40 changed files with 106 additions and 61 deletions.
1 change: 1 addition & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -1010,6 +1010,7 @@ if (!is_ios) {
"//services/device/public/mojom:generic_sensor_js_data_deps",
"//skia/public/interfaces:interfaces_js_data_deps",
"//third_party/blink/public:blink_devtools_frontend_resources_files",
"//third_party/blink/public:mojo_bindings_js_data_deps",
"//third_party/mesa_headers",
"//tools/imagediff",
]
Expand Down
6 changes: 3 additions & 3 deletions components/pdf/common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ mojom("interfaces") {
]

public_deps = [
"//third_party/blink/public/mojom:mojom_platform",
"//third_party/blink/public:mojo_bindings",
"//ui/gfx/geometry/mojo",
"//url/mojom:url_mojom_gurl",
]

overridden_deps = [ "//third_party/blink/public/mojom:mojom_platform" ]
overridden_deps = [ "//third_party/blink/public:mojo_bindings" ]
component_deps = [ "//content/public/common" ]

overridden_deps_blink = [ "//third_party/blink/public/mojom:mojom_platform" ]
overridden_deps_blink = [ "//third_party/blink/public:mojo_bindings" ]
component_deps_blink = [ "//third_party/blink/renderer/platform" ]

cpp_only = true
Expand Down
2 changes: 1 addition & 1 deletion content/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,11 @@ jumbo_source_set("browser") {
"//third_party/angle:angle_common",
"//third_party/blink/public:blink_headers",
"//third_party/blink/public:buildflags",
"//third_party/blink/public:mojo_bindings",
"//third_party/blink/public:resources",
"//third_party/blink/public:scaled_resources",
"//third_party/blink/public/common",
"//third_party/blink/public/mojom:mojom_broadcastchannel_bindings",
"//third_party/blink/public/mojom:web_bluetooth_mojo_bindings",
"//third_party/boringssl",
"//third_party/brotli:dec",
"//third_party/icu",
Expand Down
7 changes: 7 additions & 0 deletions content/browser/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ include_rules = [
"+third_party/blink/public/web/web_tree_scope_type.h",
"+third_party/blink/public/web/web_triggering_event_info.h",

# Allow mojo generated files in WebKit. These files use STL types and
# don't use WTF types.
"+third_party/blink/public/platform/modules/bluetooth/web_bluetooth.mojom.h",
"+third_party/blink/public/platform/modules/cookie_store/cookie_store.mojom.h",
"+third_party/blink/public/platform/modules/mediastream/media_devices.mojom.h",
"+third_party/blink/public/platform/modules/websockets/websocket.mojom.h",

# DO NOT ADD ANY CHROME OR COMPONENTS INCLUDES HERE!!!
# See https://sites.google.com/a/chromium.org/dev/developers/content-module
# for more information.
Expand Down
2 changes: 1 addition & 1 deletion content/browser/bluetooth/bluetooth_allowed_devices.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "base/optional.h"
#include "content/common/bluetooth/web_bluetooth_device_id.h"
#include "content/common/content_export.h"
#include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom.h"
#include "third_party/blink/public/platform/modules/bluetooth/web_bluetooth.mojom.h"

namespace device {
class BluetoothUUID;
Expand Down
2 changes: 1 addition & 1 deletion content/browser/bluetooth/bluetooth_blocklist.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "base/strings/string_piece.h"
#include "content/common/content_export.h"
#include "device/bluetooth/bluetooth_uuid.h"
#include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom.h"
#include "third_party/blink/public/platform/modules/bluetooth/web_bluetooth.mojom.h"

namespace content {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "base/timer/timer.h"
#include "content/common/content_export.h"
#include "content/public/browser/bluetooth_chooser.h"
#include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom.h"
#include "third_party/blink/public/platform/modules/bluetooth/web_bluetooth.mojom.h"

namespace device {
class BluetoothAdapter;
Expand Down
2 changes: 1 addition & 1 deletion content/browser/bluetooth/bluetooth_metrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <string>
#include <vector>

#include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom.h"
#include "third_party/blink/public/platform/modules/bluetooth/web_bluetooth.mojom.h"

namespace base {
class TimeDelta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "base/optional.h"
#include "content/common/bluetooth/web_bluetooth_device_id.h"
#include "content/common/content_export.h"
#include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom.h"
#include "third_party/blink/public/platform/modules/bluetooth/web_bluetooth.mojom.h"
#include "url/origin.h"

namespace device {
Expand Down
2 changes: 1 addition & 1 deletion content/browser/bluetooth/web_bluetooth_service_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "device/bluetooth/bluetooth_remote_gatt_service.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "mojo/public/cpp/bindings/interface_ptr_set.h"
#include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom.h"
#include "third_party/blink/public/platform/modules/bluetooth/web_bluetooth.mojom.h"

namespace url {
class Origin;
Expand Down
2 changes: 1 addition & 1 deletion content/browser/frame_host/render_frame_host_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
#include "third_party/blink/public/common/feature_policy/feature_policy.h"
#include "third_party/blink/public/common/frame/frame_owner_element_type.h"
#include "third_party/blink/public/common/frame/user_activation_update_type.h"
#include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom.h"
#include "third_party/blink/public/mojom/choosers/file_chooser.mojom.h"
#include "third_party/blink/public/mojom/commit_result/commit_result.mojom.h"
#include "third_party/blink/public/mojom/devtools/devtools_agent.mojom.h"
Expand All @@ -75,6 +74,7 @@
#include "third_party/blink/public/mojom/service_worker/service_worker_provider.mojom.h"
#include "third_party/blink/public/mojom/webauthn/authenticator.mojom.h"
#include "third_party/blink/public/mojom/worker/dedicated_worker_host_factory.mojom.h"
#include "third_party/blink/public/platform/modules/bluetooth/web_bluetooth.mojom.h"
#include "third_party/blink/public/platform/web_focus_type.h"
#include "third_party/blink/public/platform/web_insecure_request_policy.h"
#include "third_party/blink/public/platform/web_scroll_types.h"
Expand Down
2 changes: 1 addition & 1 deletion content/browser/service_manager/service_manager_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@

#if defined(OS_LINUX)
#include "components/services/font/font_service_app.h"
#include "components/services/font/public/interfaces/constants.mojom.h" // nogncheck
#include "components/services/font/public/interfaces/constants.mojom.h"
#endif

#if defined(OS_CHROMEOS)
Expand Down
1 change: 1 addition & 0 deletions content/child/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ target(link_target_type, "child") {
"//storage/common",
"//third_party/blink/public:blink_headers",
"//third_party/blink/public:buildflags",
"//third_party/blink/public:mojo_bindings",
"//third_party/blink/public:resources",
"//third_party/blink/public:scaled_resources",
"//third_party/blink/public/common",
Expand Down
2 changes: 1 addition & 1 deletion content/common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,8 @@ mojom("mojo_bindings") {
"//services/viz/public/interfaces",
"//services/ws/public/mojom",
"//skia/public/interfaces",
"//third_party/blink/public:mojo_bindings",
"//third_party/blink/public/mojom:mojom_core",
"//third_party/blink/public/mojom:web_bluetooth_mojo_bindings",
"//third_party/blink/public/mojom:web_feature_mojo_bindings",
"//ui/base/ime/mojo",
"//ui/base/mojo",
Expand Down
1 change: 1 addition & 0 deletions content/common/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ include_rules = [
"+third_party/blink/public/platform/web_touch_event.h",
"+third_party/blink/public/platform/linux/web_fallback_font.h",
"+third_party/blink/public/platform/mac/web_scrollbar_theme.h",
"+third_party/blink/public/platform/modules/bluetooth/web_bluetooth.mojom.h",
"+third_party/blink/public/platform/modules/device_orientation/WebDeviceMotionData.h",
"+third_party/blink/public/platform/modules/device_orientation/WebDeviceOrientationData.h",
"+third_party/blink/public/platform/modules/mediastream/media_devices.mojom.h",
Expand Down
3 changes: 0 additions & 3 deletions content/common/bluetooth/OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@ file://content/browser/bluetooth/OWNERS
per-file *_struct_traits*.*=set noparent
per-file *_struct_traits*.*=file://ipc/SECURITY_OWNERS

per-file *.typemap=set noparent
per-file *.typemap=file://ipc/SECURITY_OWNERS

# TEAM: web-bluetooth@chromium.org
# COMPONENT: Blink>Bluetooth
3 changes: 2 additions & 1 deletion content/common/bluetooth/web_bluetooth_device_id.typemap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

mojom = "//third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom"
mojom =
"//third_party/blink/public/platform/modules/bluetooth/web_bluetooth.mojom"
public_headers = [ "//content/common/bluetooth/web_bluetooth_device_id.h" ]
traits_headers =
[ "//content/common/bluetooth/web_bluetooth_device_id_struct_traits.h" ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <string>

#include "content/common/bluetooth/web_bluetooth_device_id.h"
#include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom.h"
#include "third_party/blink/public/platform/modules/bluetooth/web_bluetooth.mojom.h"

namespace mojo {

Expand Down
1 change: 1 addition & 0 deletions content/public/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ jumbo_source_set("browser_sources") {

# We expose storage headers for quota and blob storage context in the public API.
"//storage/browser",
"//third_party/blink/public:mojo_bindings",
]
deps = [
"//cc",
Expand Down
2 changes: 2 additions & 0 deletions content/public/common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ jumbo_source_set("common_sources") {
"//services/service_manager/public/cpp",
"//services/service_manager/public/mojom",
"//third_party/blink/public:blink_headers",
"//third_party/blink/public:mojo_bindings",
"//ui/accessibility",
"//ui/surface",
"//url/ipc:url_ipc",
Expand Down Expand Up @@ -381,6 +382,7 @@ mojom("interfaces") {
"//services/network/public/mojom",
"//services/network/public/mojom:mojom_ip_address",
"//services/network/public/mojom:websocket_mojom",
"//third_party/blink/public:mojo_bindings",
"//ui/accessibility:ax_enums_mojo",
"//url/mojom:url_mojom_gurl",
"//url/mojom:url_mojom_origin",
Expand Down
1 change: 1 addition & 0 deletions content/renderer/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,7 @@ target(link_target_type, "renderer") {
"//storage/common",
"//third_party/blink/public:blink",
"//third_party/blink/public:buildflags",
"//third_party/blink/public:mojo_bindings",
"//third_party/blink/public/common",
"//third_party/boringssl",
"//third_party/icu",
Expand Down
2 changes: 1 addition & 1 deletion content/test/test_render_frame_host.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
#include "third_party/blink/public/common/frame/frame_owner_element_type.h"
#include "third_party/blink/public/common/frame/frame_policy.h"
#include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom.h"
#include "third_party/blink/public/platform/modules/bluetooth/web_bluetooth.mojom.h"
#include "third_party/blink/public/platform/web_mixed_content_context_type.h"
#include "third_party/blink/public/web/web_tree_scope_type.h"
#include "ui/base/page_transition_types.h"
Expand Down
1 change: 1 addition & 0 deletions content/utility/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jumbo_source_set("utility") {
"//services/video_capture/public/mojom:constants",
"//services/viz:lib",
"//third_party/blink/public:blink_headers",
"//third_party/blink/public:mojo_bindings",
"//url",
]

Expand Down
1 change: 1 addition & 0 deletions services/device/public/mojom/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ mojom("mojom") {
visibility_blink = [
"//third_party/blink/renderer/bindings/modules/v8:generate_mojo_bindings",
"//third_party/blink/renderer/platform:blink_platform_public_deps",
"//third_party/blink/public:mojo_bindings_blink",
"//third_party/blink/public/mojom:mojom_platform_blink",
]
}
Expand Down
60 changes: 60 additions & 0 deletions third_party/blink/public/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,8 @@ source_set("blink_headers") {
]

deps = [
":generate_mojo_bindings",
":mojo_bindings_blink_headers",
"//base:base",
"//cc:cc",
"//cc/paint:paint",
Expand Down Expand Up @@ -657,3 +659,61 @@ repack("scaled_resources_200_percent") {
":scaled_resources",
]
}

# TODO: Move these into blink/public/mojom.
mojom("mojo_bindings") {
visibility = [
"//content/*",
"//chrome/common:mojo_bindings",
]
visibility_blink =
[ "//third_party/blink/renderer/platform:blink_platform_public_deps" ]
sources = [
"platform/modules/bluetooth/web_bluetooth.mojom",
]
public_deps = [
"//components/services/font/public/interfaces",
"//device/bluetooth/public/mojom",
"//mojo/public/mojom/base",
"//services/device/public/mojom",
"//services/network/public/mojom",
"//services/service_manager/public/mojom",
"//skia/public/interfaces",
"//third_party/blink/public/mojom:mojom_platform",
"//ui/gfx/geometry/mojo",
"//url/mojom:url_mojom_gurl",
"//url/mojom:url_mojom_origin",
]

overridden_deps = [ "//third_party/blink/public/mojom:mojom_platform" ]
component_deps = [ "//third_party/blink/public/common" ]

component_output_prefix = "blink_mojo_bindings"

# The chromium variant must be linked with content and use the same export
# settings in component build because of the WebBluetoothDeviceId typemap
# inside content.
export_class_attribute = "CONTENT_EXPORT"
export_define = "CONTENT_IMPLEMENTATION=1"
export_header = "content/common/content_export.h"

# Similarly, the blink variant must be linked with the platform component
# since it uses types from it in its typemaps.
export_class_attribute_blink = "BLINK_PLATFORM_EXPORT"
export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
export_header_blink = "third_party/blink/public/platform/web_common.h"
}

# Note that this intentionally depends on the generator target of the mojom
# target instead of the mojom target itself directly. This is to ensure that the
# dependencies are header-only and don't link against any bindings code.
group("generate_mojo_bindings") {
deps = [
# It's important to generate both the regular and the Blink variants. The
# Blink public API exposes a number of Mojo interfaces; omitting it will
# cause non-deterministic compile failures for code that uses the regular
# variant of the generated files.
":mojo_bindings_blink_headers",
":mojo_bindings_headers",
]
}
31 changes: 0 additions & 31 deletions third_party/blink/public/mojom/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -327,37 +327,6 @@ mojom("mojom_modules") {
export_header_blink = "third_party/blink/renderer/modules/modules_export.h"
}

mojom("web_bluetooth_mojo_bindings") {
visibility = [
"//content/browser:browser",
"//content/common:mojo_bindings",
]

visibility_blink =
[ "//third_party/blink/renderer/platform:blink_platform_public_deps" ]

sources = [
"bluetooth/web_bluetooth.mojom",
]

public_deps = [
"//device/bluetooth/public/mojom",
]

# The chromium variant must be linked with content and use the same export
# settings in component build because of the WebBluetoothDeviceId typemap
# inside content.
export_class_attribute = "CONTENT_EXPORT"
export_define = "CONTENT_IMPLEMENTATION=1"
export_header = "content/common/content_export.h"

# Similarly, the blink variant must be linked with the platform component
# since it uses types from it in its typemaps.
export_class_attribute_blink = "BLINK_PLATFORM_EXPORT"
export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
export_header_blink = "third_party/blink/public/platform/web_common.h"
}

# The mojom_broadcastchannel_bindings is separated from the rest of mojom files
# to allow blink/renderer/core to depend on this.
mojom("mojom_broadcastchannel_bindings") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

mojom = "//third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom"
mojom =
"//third_party/blink/public/platform/modules/bluetooth/web_bluetooth.mojom"
public_headers =
[ "//third_party/blink/renderer/platform/wtf/text/wtf_string.h" ]
traits_headers =
Expand Down
1 change: 1 addition & 0 deletions third_party/blink/renderer/bindings/core/v8/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ jumbo_source_set("testing") {
deps = [
":bindings_core_v8_generated",
"//skia",
"//third_party/blink/public:generate_mojo_bindings",
"//third_party/blink/renderer/core:all_generators",
"//third_party/blink/renderer/platform",
"//v8",
Expand Down
2 changes: 1 addition & 1 deletion third_party/blink/renderer/modules/bluetooth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ for the [Web Bluetooth specification]. It uses the Web Bluetooth Service
[mojom] to communicate with the [Web Bluetooth Service].

[Web Bluetooth specification]: https://webbluetoothcg.github.io/web-bluetooth/
[mojom]: ../../../public/mojom/bluetooth/web_bluetooth.mojom
[mojom]: ../../../public/platform/modules/bluetooth/web_bluetooth.mojom
[Web Bluetooth Service]: /content/browser/bluetooth/


Expand Down
2 changes: 1 addition & 1 deletion third_party/blink/renderer/modules/bluetooth/bluetooth.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define THIRD_PARTY_BLINK_RENDERER_MODULES_BLUETOOTH_BLUETOOTH_H_

#include <memory>
#include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom-blink.h"
#include "third_party/blink/public/platform/modules/bluetooth/web_bluetooth.mojom-blink.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise.h"
#include "third_party/blink/renderer/modules/bluetooth/bluetooth_device.h"
#include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define THIRD_PARTY_BLINK_RENDERER_MODULES_BLUETOOTH_BLUETOOTH_DEVICE_H_

#include <memory>
#include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom-blink.h"
#include "third_party/blink/public/platform/modules/bluetooth/web_bluetooth.mojom-blink.h"
#include "third_party/blink/renderer/core/execution_context/context_lifecycle_observer.h"
#include "third_party/blink/renderer/modules/bluetooth/bluetooth_remote_gatt_server.h"
#include "third_party/blink/renderer/modules/event_target_modules.h"
Expand Down
Loading

0 comments on commit e1e8c39

Please sign in to comment.