diff --git a/ash/BUILD.gn b/ash/BUILD.gn index 4b18eed76e338a..0eaaeef7354e78 100644 --- a/ash/BUILD.gn +++ b/ash/BUILD.gn @@ -1177,7 +1177,6 @@ component("ash") { "//ash/strings", "//ash/wayland", "//mash/public/mojom", - "//mojo/common:values_struct_traits", "//mojo/public/cpp/system", "//services/ui/common:mus_common", "//services/ui/public/cpp", diff --git a/ash/DEPS b/ash/DEPS index 78e87e2982be61..094cff310048ae 100644 --- a/ash/DEPS +++ b/ash/DEPS @@ -22,7 +22,6 @@ include_rules = [ "+media", "+mash/public/mojom", "+mash/shelf/public", - "+mojo/common", "+mojo/public", "+services/catalog/public", "+services/preferences/public", diff --git a/ash/components/autoclick/BUILD.gn b/ash/components/autoclick/BUILD.gn index 491e99d25ed921..ef73514e08e3d8 100644 --- a/ash/components/autoclick/BUILD.gn +++ b/ash/components/autoclick/BUILD.gn @@ -19,7 +19,6 @@ source_set("lib") { "//ash/public/cpp", "//base", "//mash/public/mojom", - "//mojo/common", "//mojo/public/cpp/bindings", "//services/service_manager/public/cpp", "//services/ui/public/cpp", diff --git a/ash/components/touch_hud/BUILD.gn b/ash/components/touch_hud/BUILD.gn index a329ef2d7e1d2d..2a23ebdfc22ccf 100644 --- a/ash/components/touch_hud/BUILD.gn +++ b/ash/components/touch_hud/BUILD.gn @@ -18,7 +18,6 @@ source_set("lib") { "//ash/touch_hud", "//base", "//mash/public/mojom", - "//mojo/common", "//mojo/public/cpp/bindings", "//services/service_manager/public/cpp", "//services/ui/public/cpp", diff --git a/ash/login/ui/lock_contents_view.cc b/ash/login/ui/lock_contents_view.cc index b255585da87dcd..70b1c1e852793e 100644 --- a/ash/login/ui/lock_contents_view.cc +++ b/ash/login/ui/lock_contents_view.cc @@ -36,7 +36,6 @@ #include "base/strings/string16.h" #include "base/strings/utf_string_conversions.h" #include "components/user_manager/user_type.h" -#include "mojo/common/values_struct_traits.h" #include "ui/accessibility/ax_node_data.h" #include "ui/base/l10n/l10n_util.h" #include "ui/display/display.h" diff --git a/ash/login/ui/lock_debug_view.cc b/ash/login/ui/lock_debug_view.cc index bedf22c622a66b..e52c6df745f3dc 100644 --- a/ash/login/ui/lock_debug_view.cc +++ b/ash/login/ui/lock_debug_view.cc @@ -21,7 +21,6 @@ #include "ash/shell.h" #include "base/optional.h" #include "base/strings/utf_string_conversions.h" -#include "mojo/common/values_struct_traits.h" #include "ui/base/ime/chromeos/ime_keyboard.h" #include "ui/views/controls/button/md_text_button.h" #include "ui/views/layout/box_layout.h" diff --git a/ash/login/ui/login_expanded_public_account_view.cc b/ash/login/ui/login_expanded_public_account_view.cc index 547ad1fdbf05cc..eabf3e732d56b7 100644 --- a/ash/login/ui/login_expanded_public_account_view.cc +++ b/ash/login/ui/login_expanded_public_account_view.cc @@ -11,7 +11,6 @@ #include "ash/shell.h" #include "ash/strings/grit/ash_strings.h" #include "base/strings/utf_string_conversions.h" -#include "mojo/common/values_struct_traits.h" #include "ui/base/l10n/l10n_util.h" #include "ui/gfx/canvas.h" #include "ui/gfx/paint_vector_icon.h" diff --git a/ash/login/ui/login_user_view.cc b/ash/login/ui/login_user_view.cc index 07da8380bd6c1b..59aa0c5b83f7d5 100644 --- a/ash/login/ui/login_user_view.cc +++ b/ash/login/ui/login_user_view.cc @@ -23,7 +23,6 @@ #include "base/memory/weak_ptr.h" #include "base/strings/utf_string_conversions.h" #include "components/user_manager/user_type.h" -#include "mojo/common/values_struct_traits.h" #include "ui/base/l10n/l10n_util.h" #include "ui/compositor/layer_animation_sequence.h" #include "ui/compositor/layer_animator.h" diff --git a/ash/public/cpp/DEPS b/ash/public/cpp/DEPS index aa4234d521451e..dab14305cd0542 100644 --- a/ash/public/cpp/DEPS +++ b/ash/public/cpp/DEPS @@ -1,6 +1,5 @@ include_rules = [ "+components/prefs", - "+mojo/common", "+skia/public/interfaces", "+ui/display", ] diff --git a/build/check_gn_headers_whitelist.txt b/build/check_gn_headers_whitelist.txt index 21b5f34d9f9eb5..be45dbe28af636 100644 --- a/build/check_gn_headers_whitelist.txt +++ b/build/check_gn_headers_whitelist.txt @@ -186,7 +186,6 @@ media/formats/mpeg/adts_stream_parser.h media/formats/mpeg/mpeg1_audio_stream_parser.h media/formats/mpeg/mpeg_audio_stream_parser_base.h media/gpu/media_gpu_export.h -mojo/common/mojo_common_export.h mojo/edk/system/broker_messages.h mojo/edk/system/system_impl_export.h mojo/public/cpp/bindings/strong_associated_binding_set.h diff --git a/chrome/DEPS b/chrome/DEPS index 44a9f948fb4dda..bc128f44262ad1 100644 --- a/chrome/DEPS +++ b/chrome/DEPS @@ -26,7 +26,6 @@ include_rules = [ "+content/public/common", "+content/public/test", "+media/media_buildflags.h", - "+mojo/common", "+mojo/public", "+ppapi/buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn index 4070cd45775620..7d0adb6811cdcc 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn @@ -1761,7 +1761,6 @@ jumbo_split_static_library("browser") { "//media/mojo/interfaces:mirror_service_remoting", "//media/mojo/interfaces:remoting", "//media/mojo/services", - "//mojo/common", "//mojo/edk", "//mojo/public/cpp/bindings", "//net:extras", diff --git a/chrome/browser/chromeos/BUILD.gn b/chrome/browser/chromeos/BUILD.gn index bca7c563f56e9e..7e848eb2b1cbc6 100644 --- a/chrome/browser/chromeos/BUILD.gn +++ b/chrome/browser/chromeos/BUILD.gn @@ -162,7 +162,6 @@ source_set("chromeos") { "//mash/public/mojom", "//media", "//media/mojo/interfaces", - "//mojo/common", "//net", "//ppapi/proxy:ipc", # For PpapiMsg_LoadPlugin "//services/data_decoder/public/cpp", diff --git a/chrome/browser/vr/BUILD.gn b/chrome/browser/vr/BUILD.gn index 5ee1c1aa1d3bde..41b0d812bbc1be 100644 --- a/chrome/browser/vr/BUILD.gn +++ b/chrome/browser/vr/BUILD.gn @@ -310,7 +310,6 @@ test("vr_common_unittests") { deps = [ ":vr_test_support", - "//mojo/common", "//mojo/public/cpp/bindings", "//testing/gmock", "//ui/gfx/geometry", diff --git a/chromeos/services/device_sync/BUILD.gn b/chromeos/services/device_sync/BUILD.gn index b6a30855d676e7..38901258333186 100644 --- a/chromeos/services/device_sync/BUILD.gn +++ b/chromeos/services/device_sync/BUILD.gn @@ -86,7 +86,6 @@ source_set("unit_tests") { "//components/cryptauth:test_support", "//components/gcm_driver:test_support", "//components/prefs:test_support", - "//mojo/common", "//services/identity/public/cpp:test_support", "//services/service_manager/public/cpp:service_test_support", "//services/service_manager/public/cpp/test:test_support", diff --git a/chromeos/services/device_sync/public/mojom/BUILD.gn b/chromeos/services/device_sync/public/mojom/BUILD.gn index e27a1f09219dcd..f239ae36a729c3 100644 --- a/chromeos/services/device_sync/public/mojom/BUILD.gn +++ b/chromeos/services/device_sync/public/mojom/BUILD.gn @@ -27,7 +27,6 @@ source_set("unit_tests") { "//base", "//base/test:test_support", "//components/cryptauth", - "//mojo/common", "//mojo/public/cpp/test_support:test_utils", "//testing/gtest", ] diff --git a/components/arc/common/bluetooth.mojom b/components/arc/common/bluetooth.mojom index c3e0ebf5e4f59f..22b709ecc8d33f 100644 --- a/components/arc/common/bluetooth.mojom +++ b/components/arc/common/bluetooth.mojom @@ -278,8 +278,8 @@ struct BluetoothSdpAttribute { // change. This field is introduced between version 7 and 8, though // MinVersion is not annotated because of breaking change, too. // See details in the bug linked below. - // TODO(crbug.com/767313): Use mojo/common/values.mojom, when new libmojo - // (440057 or later) is rolled to ARC repository. + // TODO(crbug.com/767313): Use mojo/public/mojom/base/values.mojom, when new + // libmojo (440057 or later) is rolled to ARC repository. string? json_value@3; }; diff --git a/components/autofill/content/DEPS b/components/autofill/content/DEPS index 0baa569b70e474..d9c00e11673478 100644 --- a/components/autofill/content/DEPS +++ b/components/autofill/content/DEPS @@ -1,6 +1,5 @@ include_rules = [ "+content/public/common", - "+mojo/common", "+mojo/public", "+services/service_manager/public/cpp", ] diff --git a/components/mirroring/DEPS b/components/mirroring/DEPS index a2f3fc1a852612..f5b9c0c247d6c2 100644 --- a/components/mirroring/DEPS +++ b/components/mirroring/DEPS @@ -1,6 +1,5 @@ include_rules = [ "+media", - "+mojo/common", "+mojo/public", # For testing diff --git a/components/password_manager/content/DEPS b/components/password_manager/content/DEPS index e86b35042fb4a5..f96967fa5abb59 100644 --- a/components/password_manager/content/DEPS +++ b/components/password_manager/content/DEPS @@ -1,7 +1,6 @@ include_rules = [ "+components/autofill/core/common", "+content/public/common", - "+mojo/common", "+mojo/public", # Allow inclusion of WebKit API files. "+third_party/blink/public/platform", diff --git a/components/printing/service/BUILD.gn b/components/printing/service/BUILD.gn index 36a86e1c70282b..5b4d18904ce647 100644 --- a/components/printing/service/BUILD.gn +++ b/components/printing/service/BUILD.gn @@ -60,7 +60,6 @@ if (enable_basic_printing) { "//cc/paint:paint", "//components/crash/core/common:crash_key", "//components/printing/service/public/interfaces", - "//mojo/common", "//services/service_manager/public/cpp:service_test_support", "//skia", "//testing/gmock", diff --git a/components/services/filesystem/BUILD.gn b/components/services/filesystem/BUILD.gn index a28630b38f23d0..504758b2784876 100644 --- a/components/services/filesystem/BUILD.gn +++ b/components/services/filesystem/BUILD.gn @@ -27,7 +27,6 @@ static_library("lib") { deps = [ "//base", "//components/services/filesystem/public/interfaces", - "//mojo/common", "//mojo/public/cpp/system", "//services/service_manager/public/cpp", "//services/service_manager/public/mojom", @@ -48,7 +47,6 @@ if (!is_ios) { ":lib", "//base", "//components/services/filesystem/public/interfaces", - "//mojo/common", "//mojo/public/cpp/bindings", "//mojo/public/cpp/system", "//services/service_manager/public/cpp", @@ -73,7 +71,6 @@ if (!is_ios) { deps = [ "//base", "//components/services/filesystem/public/interfaces", - "//mojo/common", "//mojo/public/cpp/bindings", "//mojo/public/cpp/system", "//services/service_manager/public/cpp", diff --git a/components/services/filesystem/DEPS b/components/services/filesystem/DEPS index 776080079ba516..541d16a8a62fad 100644 --- a/components/services/filesystem/DEPS +++ b/components/services/filesystem/DEPS @@ -1,6 +1,5 @@ include_rules = [ "+components/prefs", - "+mojo/common", "+mojo/public", "+mojo/util", "+services/service_manager", diff --git a/components/services/font/DEPS b/components/services/font/DEPS index 5504d41f9a2149..dccac320689609 100644 --- a/components/services/font/DEPS +++ b/components/services/font/DEPS @@ -1,6 +1,5 @@ include_rules = [ "+services/service_manager", - "+mojo/common", "+mojo/public", "+skia", "+third_party/skia/include", diff --git a/components/services/font/public/cpp/BUILD.gn b/components/services/font/public/cpp/BUILD.gn index 667d32ad6a6824..da5ce239c02d1f 100644 --- a/components/services/font/public/cpp/BUILD.gn +++ b/components/services/font/public/cpp/BUILD.gn @@ -15,7 +15,6 @@ source_set("cpp") { deps = [ "../interfaces", "//base", - "//mojo/common", "//mojo/public/cpp/bindings", "//mojo/public/cpp/system", "//services/service_manager/public/cpp", diff --git a/components/services/leveldb/BUILD.gn b/components/services/leveldb/BUILD.gn index e69401ec9b5edb..7fc6bd01c7c9b5 100644 --- a/components/services/leveldb/BUILD.gn +++ b/components/services/leveldb/BUILD.gn @@ -27,7 +27,6 @@ static_library("lib") { ] deps = [ - "//mojo/common", "//mojo/public/cpp/system", "//services/service_manager/public/cpp", "//third_party/leveldatabase", @@ -44,7 +43,6 @@ service("leveldb") { deps = [ ":lib", "//components/services/leveldb/public/interfaces", - "//mojo/common", "//mojo/public/cpp/bindings", "//mojo/public/cpp/system", "//services/service_manager/public/cpp", @@ -70,7 +68,6 @@ service_test("leveldb_service_unittests") { "//components/services/filesystem/public/interfaces", "//components/services/leveldb/public/cpp", "//components/services/leveldb/public/interfaces", - "//mojo/common", "//mojo/public/cpp/bindings", "//mojo/public/cpp/system", "//services/service_manager/public/cpp", diff --git a/components/services/leveldb/DEPS b/components/services/leveldb/DEPS index 048eb8af42644d..031b4cc4a7278f 100644 --- a/components/services/leveldb/DEPS +++ b/components/services/leveldb/DEPS @@ -1,6 +1,5 @@ include_rules = [ "+components/services/filesystem/public/interfaces", - "+mojo/common", "+mojo/public", "+mojo/util", "+services/service_manager", diff --git a/components/services/leveldb/public/cpp/BUILD.gn b/components/services/leveldb/public/cpp/BUILD.gn index b43e96d8c55dd5..aab9403a9ab11e 100644 --- a/components/services/leveldb/public/cpp/BUILD.gn +++ b/components/services/leveldb/public/cpp/BUILD.gn @@ -13,7 +13,6 @@ static_library("cpp") { deps = [ "//base", "//components/services/leveldb/public/interfaces", - "//mojo/common", "//services/service_manager/public/cpp", "//third_party/leveldatabase", ] diff --git a/components/translate/content/common/DEPS b/components/translate/content/common/DEPS deleted file mode 100644 index 6cfa565facaa5b..00000000000000 --- a/components/translate/content/common/DEPS +++ /dev/null @@ -1,3 +0,0 @@ -include_rules = [ - "+mojo/common", -] diff --git a/content/DEPS b/content/DEPS index e47aa5e97944be..e187ebec4b325e 100644 --- a/content/DEPS +++ b/content/DEPS @@ -35,7 +35,6 @@ include_rules = [ "+dbus", "+gpu", "+media", - "+mojo/common", "+mojo/edk/embedder", "+mojo/edk/js", "+mojo/message_pump", diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn index e0585ae1a7ecd8..ee240736e07d37 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn @@ -107,8 +107,6 @@ jumbo_source_set("browser") { "//media/mojo/interfaces", "//media/mojo/interfaces:constants", "//media/mojo/services", - "//mojo/common", - "//mojo/common:values_struct_traits", "//mojo/edk", "//mojo/public/cpp/bindings", "//mojo/public/js:resources", diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc index ad8ef2ced12eaf..132e3b622e36ab 100644 --- a/content/browser/frame_host/navigation_request.cc +++ b/content/browser/frame_host/navigation_request.cc @@ -51,7 +51,6 @@ #include "content/public/common/url_constants.h" #include "content/public/common/url_utils.h" #include "content/public/common/web_preferences.h" -#include "mojo/common/values_struct_traits.h" #include "net/base/load_flags.h" #include "net/base/net_errors.h" #include "net/base/registry_controlled_domains/registry_controlled_domain.h" diff --git a/content/browser/frame_host/navigation_request_info.cc b/content/browser/frame_host/navigation_request_info.cc index 4e918bf1e6dcbb..b6381c1024a9bd 100644 --- a/content/browser/frame_host/navigation_request_info.cc +++ b/content/browser/frame_host/navigation_request_info.cc @@ -4,7 +4,6 @@ #include "content/browser/frame_host/navigation_request_info.h" #include "content/common/service_worker/service_worker_types.h" -#include "mojo/common/values_struct_traits.h" namespace content { diff --git a/content/browser/loader/navigation_url_loader_network_service.cc b/content/browser/loader/navigation_url_loader_network_service.cc index b4c1232ea11172..955cb24e64d1d1 100644 --- a/content/browser/loader/navigation_url_loader_network_service.cc +++ b/content/browser/loader/navigation_url_loader_network_service.cc @@ -56,7 +56,6 @@ #include "content/public/common/url_utils.h" #include "content/public/common/weak_wrapper_shared_url_loader_factory.h" #include "content/public/common/webplugininfo.h" -#include "mojo/common/values_struct_traits.h" #include "net/base/load_flags.h" #include "net/http/http_content_disposition.h" #include "net/traffic_annotation/network_traffic_annotation.h" diff --git a/content/browser/renderer_host/media/video_capture_host.cc b/content/browser/renderer_host/media/video_capture_host.cc index c362c364707ecd..e75c338d015070 100644 --- a/content/browser/renderer_host/media/video_capture_host.cc +++ b/content/browser/renderer_host/media/video_capture_host.cc @@ -13,7 +13,6 @@ #include "content/browser/renderer_host/media/video_capture_manager.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/render_process_host.h" -#include "mojo/common/values_struct_traits.h" #include "mojo/public/cpp/bindings/strong_binding.h" namespace content { diff --git a/content/child/BUILD.gn b/content/child/BUILD.gn index fbb110d2d40318..e7d229097bd8fc 100644 --- a/content/child/BUILD.gn +++ b/content/child/BUILD.gn @@ -106,7 +106,6 @@ target(link_target_type, "child") { "//gpu/command_buffer/client", "//media", "//media/blink", - "//mojo/common", "//mojo/edk", "//net", "//services/device/public/cpp:device_features", diff --git a/content/public/common/BUILD.gn b/content/public/common/BUILD.gn index c007644bfe1b62..ebb4d5efdacfaa 100644 --- a/content/public/common/BUILD.gn +++ b/content/public/common/BUILD.gn @@ -280,7 +280,6 @@ jumbo_source_set("common_sources") { # needed because of allow_circular_includes_from. "//content/common:mojo_bindings", "//media", - "//mojo/common", "//ppapi/buildflags", "//ppapi/c", "//services/network/public/cpp", diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn index 15ff76c9e1f568..261a8928863464 100644 --- a/content/renderer/BUILD.gn +++ b/content/renderer/BUILD.gn @@ -532,7 +532,6 @@ target(link_target_type, "renderer") { "//media/mojo/clients", "//media/mojo/interfaces", "//media/mojo/interfaces:remoting", - "//mojo/common", "//mojo/public/cpp/bindings", "//net", "//ppapi/buildflags", diff --git a/content/renderer/mus/BUILD.gn b/content/renderer/mus/BUILD.gn index 559eae55f80798..718ad1c98d15cd 100644 --- a/content/renderer/mus/BUILD.gn +++ b/content/renderer/mus/BUILD.gn @@ -26,7 +26,6 @@ static_library("mus") { "//content/public/child:child_sources", "//content/public/common:common_sources", "//media/mojo/interfaces:remoting", - "//mojo/common", "//services/service_manager/public/cpp", "//services/ui/public/cpp", "//services/ui/public/interfaces", diff --git a/content/utility/BUILD.gn b/content/utility/BUILD.gn index 33342bae014c58..610106e74b7743 100644 --- a/content/utility/BUILD.gn +++ b/content/utility/BUILD.gn @@ -37,7 +37,6 @@ jumbo_source_set("utility") { "//content/public/child:child_sources", "//content/public/common:common_sources", "//media:media_buildflags", - "//mojo/common", "//mojo/public/cpp/bindings", "//net:net_with_v8", "//sandbox", diff --git a/device/BUILD.gn b/device/BUILD.gn index 1ca366e9fcec2b..d18916953c2045 100644 --- a/device/BUILD.gn +++ b/device/BUILD.gn @@ -109,7 +109,6 @@ test("device_unittests") { "//device/gamepad/public/mojom", "//device/gamepad/public/mojom:gamepad_mojom_traits_test", "//device/geolocation:unittests", - "//mojo/common", "//mojo/edk", "//mojo/public/cpp/bindings", "//net", diff --git a/device/usb/mojo/BUILD.gn b/device/usb/mojo/BUILD.gn index f31975ddedec30..0a556a864c5265 100644 --- a/device/usb/mojo/BUILD.gn +++ b/device/usb/mojo/BUILD.gn @@ -19,7 +19,6 @@ source_set("mojo") { "//device/usb", "//device/usb/public/cpp", "//device/usb/public/mojom", - "//mojo/common", "//mojo/public/cpp/bindings", "//net", ] diff --git a/device/usb/mojo/DEPS b/device/usb/mojo/DEPS deleted file mode 100644 index 6cfa565facaa5b..00000000000000 --- a/device/usb/mojo/DEPS +++ /dev/null @@ -1,3 +0,0 @@ -include_rules = [ - "+mojo/common", -] diff --git a/gpu/ipc/common/gpu_feature_info.typemap b/gpu/ipc/common/gpu_feature_info.typemap index 4f3076ad7411a1..77309f35ccccd2 100644 --- a/gpu/ipc/common/gpu_feature_info.typemap +++ b/gpu/ipc/common/gpu_feature_info.typemap @@ -7,7 +7,6 @@ public_headers = [ "//gpu/config/gpu_feature_info.h" ] traits_headers = [ "//gpu/ipc/common/gpu_feature_info_struct_traits.h" ] public_deps = [ "//gpu/config", - "//mojo/common", "//ui/gfx/geometry/mojo", ] type_mappings = [ diff --git a/gpu/ipc/common/gpu_info.typemap b/gpu/ipc/common/gpu_info.typemap index fe21131cd627f2..3e74664265c156 100644 --- a/gpu/ipc/common/gpu_info.typemap +++ b/gpu/ipc/common/gpu_info.typemap @@ -10,7 +10,6 @@ sources = [ ] public_deps = [ "//gpu/config", - "//mojo/common", "//ui/gfx/geometry/mojo", ] type_mappings = [ diff --git a/mash/DEPS b/mash/DEPS index 730486732802dc..1da21f86db8645 100644 --- a/mash/DEPS +++ b/mash/DEPS @@ -2,7 +2,6 @@ include_rules = [ "+ash/public", "+components/prefs", "+components/viz/common", - "+mojo/common", "+mojo/converters", "+mojo/public", "+services/catalog/public", diff --git a/mash/session/BUILD.gn b/mash/session/BUILD.gn index 93d7bd99c84c79..42f408fd98583c 100644 --- a/mash/session/BUILD.gn +++ b/mash/session/BUILD.gn @@ -17,7 +17,6 @@ source_set("lib") { deps = [ "//base", "//mash/common", - "//mojo/common", "//mojo/public/cpp/bindings", "//services/service_manager/public/cpp", ] @@ -42,7 +41,6 @@ service("session") { deps = [ ":lib", "//base", - "//mojo/common", "//mojo/public/cpp/bindings", "//services/service_manager/public/cpp", ] diff --git a/media/mojo/DEPS b/media/mojo/DEPS index 285448dff799fd..7216ea6714a76f 100644 --- a/media/mojo/DEPS +++ b/media/mojo/DEPS @@ -1,7 +1,5 @@ include_rules = [ "+components/ukm/test_ukm_recorder.h", - - "+mojo/common", "+mojo/converters", "+mojo/logging", "+mojo/public", diff --git a/media/mojo/clients/BUILD.gn b/media/mojo/clients/BUILD.gn index 92cdfd0fafec70..5100e5c976a173 100644 --- a/media/mojo/clients/BUILD.gn +++ b/media/mojo/clients/BUILD.gn @@ -67,7 +67,6 @@ source_set("clients") { "//media/gpu", "//media/mojo/common", "//media/mojo/common:mojo_shared_buffer_video_frame", - "//mojo/common", "//services/service_manager/public/cpp", ] @@ -90,7 +89,6 @@ source_set("jpeg_decode_accelerator") { deps = [ "//base", "//media/mojo/interfaces", - "//mojo/common", ] } diff --git a/media/mojo/common/BUILD.gn b/media/mojo/common/BUILD.gn index 72d6a25dc94015..23dfe6c13aa567 100644 --- a/media/mojo/common/BUILD.gn +++ b/media/mojo/common/BUILD.gn @@ -18,7 +18,6 @@ source_set("common") { "//gpu/ipc/common:struct_traits", "//media", "//media/mojo/interfaces", - "//mojo/common", "//mojo/public/cpp/bindings", "//mojo/public/cpp/system", "//ui/gfx/geometry", diff --git a/media/mojo/services/BUILD.gn b/media/mojo/services/BUILD.gn index 4d87502453f10b..6f45d8f8a9fa24 100644 --- a/media/mojo/services/BUILD.gn +++ b/media/mojo/services/BUILD.gn @@ -103,7 +103,6 @@ component("services") { "//media/gpu/ipc/service", "//media/mojo/common", "//media/mojo/common:mojo_shared_buffer_video_frame", - "//mojo/common", "//services/metrics/public/cpp:metrics_cpp", "//services/metrics/public/cpp:ukm_builders", "//services/service_manager/public/mojom", diff --git a/mojo/BUILD.gn b/mojo/BUILD.gn index cfac752125030a..773866299c3742 100644 --- a/mojo/BUILD.gn +++ b/mojo/BUILD.gn @@ -10,7 +10,6 @@ group("mojo") { testonly = true deps = [ ":tests", - "//mojo/common", ] if (!(is_linux && current_cpu == "x86")) { diff --git a/mojo/common/BUILD.gn b/mojo/common/BUILD.gn deleted file mode 100644 index d4042376285976..00000000000000 --- a/mojo/common/BUILD.gn +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright 2014 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") -import("//testing/test.gni") - -group("common") { - public_deps = [ - ":common_custom_types", - ] -} - -mojom("common_custom_types") { - sources = [ - "values.mojom", - ] - - public_deps = [ - "//mojo/public/mojom/base", - ] -} - -mojom("test_common_custom_types") { - sources = [ - "test_common_custom_types.mojom", - ] - public_deps = [ - ":common_custom_types", - ] -} - -test("mojo_common_unittests") { - deps = [ - ":common", - ":common_custom_types", - ":test_common_custom_types", - "//base", - "//base/test:test_support", - "//mojo/edk/test:run_all_unittests", - "//mojo/edk/test:test_support", - "//mojo/public/cpp/bindings", - "//mojo/public/cpp/test_support:test_utils", - "//testing/gtest", - "//url", - ] - - sources = [ - "common_custom_types_unittest.cc", - ] -} - -source_set("values_struct_traits") { - sources = [ - "values_struct_traits.cc", - "values_struct_traits.h", - ] - public_deps = [ - ":common_custom_types_shared_cpp_sources", - "//base", - "//mojo/public/cpp/bindings:bindings", - ] -} diff --git a/mojo/common/DEPS b/mojo/common/DEPS deleted file mode 100644 index e8ac42887d1cca..00000000000000 --- a/mojo/common/DEPS +++ /dev/null @@ -1,6 +0,0 @@ -include_rules = [ - # common must not depend on embedder. - "-mojo", - "+mojo/common", - "+mojo/public", -] diff --git a/mojo/common/OWNERS b/mojo/common/OWNERS deleted file mode 100644 index 2c44a463856dd1..00000000000000 --- a/mojo/common/OWNERS +++ /dev/null @@ -1,6 +0,0 @@ -per-file *.mojom=set noparent -per-file *.mojom=file://ipc/SECURITY_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 diff --git a/mojo/common/common_custom_types_unittest.cc b/mojo/common/common_custom_types_unittest.cc deleted file mode 100644 index ba9af3598c691c..00000000000000 --- a/mojo/common/common_custom_types_unittest.cc +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright 2016 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. - -#include "base/memory/ptr_util.h" -#include "base/message_loop/message_loop.h" -#include "base/numerics/safe_math.h" -#include "base/run_loop.h" -#include "base/values.h" -#include "mojo/common/test_common_custom_types.mojom.h" -#include "mojo/public/cpp/bindings/binding.h" -#include "testing/gtest/include/gtest/gtest.h" - -namespace mojo { -namespace common { -namespace test { -namespace { - -template -struct BounceTestTraits { - static void ExpectEquality(const T& a, const T& b) { - EXPECT_EQ(a, b); - } -}; - -template -struct PassTraits { - using Type = const T&; -}; - -template <> -struct PassTraits { - using Type = base::Time; -}; - -template <> -struct PassTraits { - using Type = base::TimeDelta; -}; - -template <> -struct PassTraits { - using Type = base::TimeTicks; -}; - -template -void DoExpectResponse(T* expected_value, - const base::Closure& closure, - typename PassTraits::Type value) { - BounceTestTraits::ExpectEquality(*expected_value, value); - closure.Run(); -} - -template -base::Callback::Type)> ExpectResponse( - T* expected_value, - const base::Closure& closure) { - return base::Bind(&DoExpectResponse, expected_value, closure); -} - -class TestValueImpl : public TestValue { - public: - explicit TestValueImpl(TestValueRequest request) - : binding_(this, std::move(request)) {} - - // TestValue implementation: - void BounceDictionaryValue(std::unique_ptr in, - BounceDictionaryValueCallback callback) override { - std::move(callback).Run(std::move(in)); - } - - void BounceListValue(std::unique_ptr in, - BounceListValueCallback callback) override { - std::move(callback).Run(std::move(in)); - } - - void BounceValue(std::unique_ptr in, - BounceValueCallback callback) override { - std::move(callback).Run(std::move(in)); - } - - private: - mojo::Binding binding_; -}; - -class CommonCustomTypesTest : public testing::Test { - protected: - CommonCustomTypesTest() {} - ~CommonCustomTypesTest() override {} - - private: - base::MessageLoop message_loop_; - - DISALLOW_COPY_AND_ASSIGN(CommonCustomTypesTest); -}; - -} // namespace - -TEST_F(CommonCustomTypesTest, Value) { - TestValuePtr ptr; - TestValueImpl impl(MakeRequest(&ptr)); - - std::unique_ptr output; - - ASSERT_TRUE(ptr->BounceValue(nullptr, &output)); - EXPECT_FALSE(output); - - auto input = std::make_unique(); - ASSERT_TRUE(ptr->BounceValue(input->CreateDeepCopy(), &output)); - EXPECT_EQ(*input, *output); - - input = std::make_unique(123); - ASSERT_TRUE(ptr->BounceValue(input->CreateDeepCopy(), &output)); - EXPECT_EQ(*input, *output); - - input = std::make_unique(1.23); - ASSERT_TRUE(ptr->BounceValue(input->CreateDeepCopy(), &output)); - EXPECT_EQ(*input, *output); - - input = std::make_unique(false); - ASSERT_TRUE(ptr->BounceValue(input->CreateDeepCopy(), &output)); - EXPECT_EQ(*input, *output); - - input = std::make_unique("test string"); - ASSERT_TRUE(ptr->BounceValue(input->CreateDeepCopy(), &output)); - EXPECT_EQ(*input, *output); - - input = base::Value::CreateWithCopiedBuffer("mojo", 4); - ASSERT_TRUE(ptr->BounceValue(input->CreateDeepCopy(), &output)); - EXPECT_EQ(*input, *output); - - auto dict = std::make_unique(); - dict->SetBoolean("bool", false); - dict->SetInteger("int", 2); - dict->SetString("string", "some string"); - dict->SetBoolean("nested.bool", true); - dict->SetInteger("nested.int", 9); - dict->Set("some_binary", base::Value::CreateWithCopiedBuffer("mojo", 4)); - dict->Set("null_value", std::make_unique()); - dict->SetKey("non_nested.int", base::Value(10)); - { - std::unique_ptr dict_list(new base::ListValue()); - dict_list->AppendString("string"); - dict_list->AppendBoolean(true); - dict->Set("list", std::move(dict_list)); - } - - std::unique_ptr dict_output; - ASSERT_TRUE(ptr->BounceDictionaryValue(dict->CreateDeepCopy(), &dict_output)); - EXPECT_EQ(*dict, *dict_output); - - input = std::move(dict); - ASSERT_TRUE(ptr->BounceValue(input->CreateDeepCopy(), &output)); - EXPECT_EQ(*input, *output); - - auto list = std::make_unique(); - list->AppendString("string"); - list->AppendDouble(42.1); - list->AppendBoolean(true); - list->Append(base::Value::CreateWithCopiedBuffer("mojo", 4)); - list->Append(std::make_unique()); - { - std::unique_ptr list_dict( - new base::DictionaryValue()); - list_dict->SetString("string", "str"); - list->Append(std::move(list_dict)); - } - std::unique_ptr list_output; - ASSERT_TRUE(ptr->BounceListValue(list->CreateDeepCopy(), &list_output)); - EXPECT_EQ(*list, *list_output); - - input = std::move(list); - ASSERT_TRUE(ptr->BounceValue(input->CreateDeepCopy(), &output)); - ASSERT_EQ(*input, *output); -} - -} // namespace test -} // namespace common -} // namespace mojo diff --git a/mojo/common/mojo_common_export.h b/mojo/common/mojo_common_export.h deleted file mode 100644 index 48d21d0d3d2ee4..00000000000000 --- a/mojo/common/mojo_common_export.h +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2013 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. - -#ifndef MOJO_COMMON_MOJO_COMMON_EXPORT_H_ -#define MOJO_COMMON_MOJO_COMMON_EXPORT_H_ - -#if defined(COMPONENT_BUILD) - -#if defined(WIN32) - -#if defined(MOJO_COMMON_IMPLEMENTATION) -#define MOJO_COMMON_EXPORT __declspec(dllexport) -#else -#define MOJO_COMMON_EXPORT __declspec(dllimport) -#endif - -#else // !defined(WIN32) - -#if defined(MOJO_COMMON_IMPLEMENTATION) -#define MOJO_COMMON_EXPORT __attribute__((visibility("default"))) -#else -#define MOJO_COMMON_EXPORT -#endif - -#endif // defined(WIN32) - -#else // !defined(COMPONENT_BUILD) -#define MOJO_COMMON_EXPORT -#endif - -#endif // MOJO_COMMON_MOJO_COMMON_EXPORT_H_ diff --git a/mojo/common/test_common_custom_types.mojom b/mojo/common/test_common_custom_types.mojom deleted file mode 100644 index e23a94ae75e0a4..00000000000000 --- a/mojo/common/test_common_custom_types.mojom +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2016 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. - -module mojo.common.test; - -import "mojo/common/values.mojom"; - -interface TestValue { - [Sync] - BounceDictionaryValue(mojo.common.mojom.DictionaryValue in) - => (mojo.common.mojom.DictionaryValue out); - [Sync] - BounceListValue(mojo.common.mojom.ListValue in) - => (mojo.common.mojom.ListValue out); - [Sync] - BounceValue(mojo.common.mojom.Value? in) - => (mojo.common.mojom.Value? out); -}; diff --git a/mojo/common/typemaps.gni b/mojo/common/typemaps.gni deleted file mode 100644 index f58f1128267a9e..00000000000000 --- a/mojo/common/typemaps.gni +++ /dev/null @@ -1,5 +0,0 @@ -# Copyright 2016 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. - -typemaps = [ "//mojo/common/values.typemap" ] diff --git a/mojo/common/values.mojom b/mojo/common/values.mojom deleted file mode 100644 index 722198c56ac51d..00000000000000 --- a/mojo/common/values.mojom +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2016 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. - -module mojo.common.mojom; - -union Value { - NullValue? null_value; - bool bool_value; - int32 int_value; - double double_value; - string string_value; - array binary_value; - DictionaryValue dictionary_value; - ListValue list_value; -}; - -struct ListValue { - array values; -}; - -struct DictionaryValue { - map values; -}; - -// An empty struct representing a null base::Value. -struct NullValue { -}; - -// To avoid versioning problems for arc. TODO(sammc): Remove ASAP. -[Native] -struct LegacyListValue; diff --git a/mojo/common/values.typemap b/mojo/common/values.typemap deleted file mode 100644 index 3bc75e7885a25d..00000000000000 --- a/mojo/common/values.typemap +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright 2016 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. - -mojom = "//mojo/common/values.mojom" -public_headers = [ "//base/values.h" ] -traits_headers = [ - "//ipc/ipc_message_utils.h", - "//mojo/common/values_struct_traits.h", -] - -public_deps = [ - "//base", - "//ipc", -] - -deps = [ - "//mojo/common:values_struct_traits", -] - -type_mappings = [ - "mojo.common.mojom.DictionaryValue=std::unique_ptr[move_only,nullable_is_same_type]", - "mojo.common.mojom.LegacyListValue=base::ListValue[non_copyable_non_movable]", - "mojo.common.mojom.ListValue=std::unique_ptr[move_only,nullable_is_same_type]", - "mojo.common.mojom.Value=std::unique_ptr[move_only,nullable_is_same_type]", -] diff --git a/mojo/common/values_struct_traits.cc b/mojo/common/values_struct_traits.cc deleted file mode 100644 index cb0bcc9761cd64..00000000000000 --- a/mojo/common/values_struct_traits.cc +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright 2016 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. - -#include "mojo/common/values_struct_traits.h" - -#include -#include -#include - -#include "base/containers/flat_map.h" -#include "base/memory/ptr_util.h" - -namespace mojo { - -bool StructTraits>:: - Read(common::mojom::ListValueDataView data, - std::unique_ptr* value_out) { - mojo::ArrayDataView view; - data.GetValuesDataView(&view); - - auto list_value = std::make_unique(); - for (size_t i = 0; i < view.size(); ++i) { - std::unique_ptr value; - if (!view.Read(i, &value)) - return false; - - list_value->Append(std::move(value)); - } - *value_out = std::move(list_value); - return true; -} - -std::unique_ptr -CloneTraits, false>::Clone( - const std::unique_ptr& input) { - return input ? input->CreateDeepCopy() : nullptr; -} - -bool StructTraits>:: - Read(common::mojom::DictionaryValueDataView data, - std::unique_ptr* value_out) { - mojo::MapDataView view; - data.GetValuesDataView(&view); - std::vector dict_storage; - dict_storage.reserve(view.size()); - for (size_t i = 0; i < view.size(); ++i) { - base::StringPiece key; - std::unique_ptr value; - if (!view.keys().Read(i, &key) || !view.values().Read(i, &value)) - return false; - - dict_storage.emplace_back(key.as_string(), std::move(value)); - } - *value_out = base::DictionaryValue::From( - std::make_unique(base::Value::DictStorage( - std::move(dict_storage), base::KEEP_LAST_OF_DUPES))); - return true; -} - -std::unique_ptr -CloneTraits, false>::Clone( - const std::unique_ptr& input) { - return input ? input->CreateDeepCopy() : nullptr; -} - -bool UnionTraits>:: - Read(common::mojom::ValueDataView data, - std::unique_ptr* value_out) { - switch (data.tag()) { - case common::mojom::ValueDataView::Tag::NULL_VALUE: { - *value_out = std::make_unique(); - return true; - } - case common::mojom::ValueDataView::Tag::BOOL_VALUE: { - *value_out = std::make_unique(data.bool_value()); - return true; - } - case common::mojom::ValueDataView::Tag::INT_VALUE: { - *value_out = std::make_unique(data.int_value()); - return true; - } - case common::mojom::ValueDataView::Tag::DOUBLE_VALUE: { - *value_out = std::make_unique(data.double_value()); - return true; - } - case common::mojom::ValueDataView::Tag::STRING_VALUE: { - base::StringPiece string_value; - if (!data.ReadStringValue(&string_value)) - return false; - *value_out = std::make_unique(string_value); - return true; - } - case common::mojom::ValueDataView::Tag::BINARY_VALUE: { - mojo::ArrayDataView binary_data; - data.GetBinaryValueDataView(&binary_data); - *value_out = base::Value::CreateWithCopiedBuffer( - reinterpret_cast(binary_data.data()), - binary_data.size()); - return true; - } - case common::mojom::ValueDataView::Tag::DICTIONARY_VALUE: { - std::unique_ptr dictionary_value; - if (!data.ReadDictionaryValue(&dictionary_value)) - return false; - *value_out = std::move(dictionary_value); - return true; - } - case common::mojom::ValueDataView::Tag::LIST_VALUE: { - std::unique_ptr list_value; - if (!data.ReadListValue(&list_value)) - return false; - *value_out = std::move(list_value); - return true; - } - } - return false; -} - -std::unique_ptr -CloneTraits, false>::Clone( - const std::unique_ptr& input) { - return input ? input->CreateDeepCopy() : nullptr; -} - -} // namespace mojo diff --git a/mojo/common/values_struct_traits.h b/mojo/common/values_struct_traits.h deleted file mode 100644 index 2a218c42a4c4fd..00000000000000 --- a/mojo/common/values_struct_traits.h +++ /dev/null @@ -1,275 +0,0 @@ -// Copyright 2016 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. - -#ifndef MOJO_COMMON_VALUES_STRUCT_TRAITS_H_ -#define MOJO_COMMON_VALUES_STRUCT_TRAITS_H_ - -#include "base/containers/span.h" -#include "base/values.h" -#include "mojo/common/values.mojom-shared.h" -#include "mojo/public/cpp/bindings/array_traits.h" -#include "mojo/public/cpp/bindings/clone_traits.h" -#include "mojo/public/cpp/bindings/map_traits.h" -#include "mojo/public/cpp/bindings/struct_traits.h" -#include "mojo/public/cpp/bindings/union_traits.h" - -namespace mojo { - -template <> -struct ArrayTraits { - using Element = base::Value; - using ConstIterator = base::ListValue::const_iterator; - - static size_t GetSize(const base::ListValue& input) { - return input.GetSize(); - } - - static ConstIterator GetBegin(const base::ListValue& input) { - return input.begin(); - } - - static void AdvanceIterator(ConstIterator& iterator) { ++iterator; } - - static const Element& GetValue(ConstIterator& iterator) { return *iterator; } -}; - -template <> -struct StructTraits { - static const base::ListValue& values(const base::ListValue& value) { - return value; - } -}; - -template <> -struct StructTraits> { - static bool IsNull(const std::unique_ptr& value) { - return !value; - } - - static void SetToNull(std::unique_ptr* value) { - value->reset(); - } - - static const base::ListValue& values( - const std::unique_ptr& value) { - return *value; - } - - static bool Read(common::mojom::ListValueDataView data, - std::unique_ptr* value); -}; - -template <> -struct CloneTraits, false> { - static std::unique_ptr Clone( - const std::unique_ptr& input); -}; - -template <> -struct MapTraits { - using Key = std::string; - using Value = base::Value; - using Iterator = base::DictionaryValue::Iterator; - - static size_t GetSize(const base::DictionaryValue& input) { - return input.size(); - } - - static Iterator GetBegin(const base::DictionaryValue& input) { - return Iterator(input); - } - - static void AdvanceIterator(Iterator& iterator) { iterator.Advance(); } - - static const Key& GetKey(Iterator& iterator) { return iterator.key(); } - - static const Value& GetValue(Iterator& iterator) { return iterator.value(); } -}; - -template <> -struct StructTraits { - static const base::DictionaryValue& values( - const base::DictionaryValue& value) { - return value; - } -}; - -template <> -struct StructTraits> { - static bool IsNull(const std::unique_ptr& value) { - return !value; - } - - static void SetToNull(std::unique_ptr* value) { - value->reset(); - } - - static const base::DictionaryValue& values( - const std::unique_ptr& value) { - return *value; - } - static bool Read(common::mojom::DictionaryValueDataView data, - std::unique_ptr* value); -}; - -template <> -struct CloneTraits, false> { - static std::unique_ptr Clone( - const std::unique_ptr& input); -}; - -template <> -struct StructTraits { - static bool IsNull(const void* value) { return true; } - static void SetToNull(void** value) {} - static bool Read(common::mojom::NullValueDataView data, void** value) { - return true; - } -}; - -template <> -struct UnionTraits { - static common::mojom::ValueDataView::Tag GetTag(const base::Value& data) { - switch (data.type()) { - case base::Value::Type::NONE: - return common::mojom::ValueDataView::Tag::NULL_VALUE; - case base::Value::Type::BOOLEAN: - return common::mojom::ValueDataView::Tag::BOOL_VALUE; - case base::Value::Type::INTEGER: - return common::mojom::ValueDataView::Tag::INT_VALUE; - case base::Value::Type::DOUBLE: - return common::mojom::ValueDataView::Tag::DOUBLE_VALUE; - case base::Value::Type::STRING: - return common::mojom::ValueDataView::Tag::STRING_VALUE; - case base::Value::Type::BINARY: - return common::mojom::ValueDataView::Tag::BINARY_VALUE; - case base::Value::Type::DICTIONARY: - return common::mojom::ValueDataView::Tag::DICTIONARY_VALUE; - case base::Value::Type::LIST: - return common::mojom::ValueDataView::Tag::LIST_VALUE; - } - NOTREACHED(); - return common::mojom::ValueDataView::Tag::NULL_VALUE; - } - - static void* null_value(const base::Value& value) { return nullptr; } - - static bool bool_value(const base::Value& value) { - bool bool_value{}; - if (!value.GetAsBoolean(&bool_value)) - NOTREACHED(); - return bool_value; - } - - static int32_t int_value(const base::Value& value) { - int int_value{}; - if (!value.GetAsInteger(&int_value)) - NOTREACHED(); - return int_value; - } - - static double double_value(const base::Value& value) { - double double_value{}; - if (!value.GetAsDouble(&double_value)) - NOTREACHED(); - return double_value; - } - - static base::StringPiece string_value(const base::Value& value) { - base::StringPiece string_piece; - if (!value.GetAsString(&string_piece)) - NOTREACHED(); - return string_piece; - } - - static base::span binary_value(const base::Value& value) { - if (!value.is_blob()) - NOTREACHED(); - return base::make_span( - reinterpret_cast(value.GetBlob().data()), - value.GetBlob().size()); - } - - static const base::ListValue& list_value(const base::Value& value) { - const base::ListValue* list_value = nullptr; - if (!value.GetAsList(&list_value)) - NOTREACHED(); - return *list_value; - } - static const base::DictionaryValue& dictionary_value( - const base::Value& value) { - const base::DictionaryValue* dictionary_value = nullptr; - if (!value.GetAsDictionary(&dictionary_value)) - NOTREACHED(); - return *dictionary_value; - } -}; - -template <> -struct UnionTraits> { - static bool IsNull(const std::unique_ptr& value) { - return !value; - } - - static void SetToNull(std::unique_ptr* value) { value->reset(); } - - static common::mojom::ValueDataView::Tag GetTag( - const std::unique_ptr& value) { - return UnionTraits::GetTag( - *value); - } - - static void* null_value(const std::unique_ptr& value) { - return UnionTraits::null_value( - *value); - } - static bool bool_value(const std::unique_ptr& value) { - return UnionTraits::bool_value( - *value); - } - static int32_t int_value(const std::unique_ptr& value) { - return UnionTraits::int_value( - *value); - } - static double double_value(const std::unique_ptr& value) { - return UnionTraits::double_value( - *value); - } - static base::StringPiece string_value( - const std::unique_ptr& value) { - return UnionTraits::string_value( - *value); - } - static base::span binary_value( - const std::unique_ptr& value) { - return UnionTraits::binary_value( - *value); - } - static const base::ListValue& list_value( - const std::unique_ptr& value) { - return UnionTraits::list_value( - *value); - } - static const base::DictionaryValue& dictionary_value( - const std::unique_ptr& value) { - return UnionTraits::dictionary_value(*value); - } - - static bool Read(common::mojom::ValueDataView data, - std::unique_ptr* value); -}; - -template <> -struct CloneTraits, false> { - static std::unique_ptr Clone( - const std::unique_ptr& input); -}; - -} // namespace mojo - -#endif // MOJO_COMMON_VALUES_STRUCT_TRAITS_H_ diff --git a/mojo/public/tools/bindings/chromium_bindings_configuration.gni b/mojo/public/tools/bindings/chromium_bindings_configuration.gni index 19804b4dd6ed01..c1ff6e2a623605 100644 --- a/mojo/public/tools/bindings/chromium_bindings_configuration.gni +++ b/mojo/public/tools/bindings/chromium_bindings_configuration.gni @@ -24,7 +24,6 @@ _typemap_imports = [ "//gpu/ipc/common/typemaps.gni", "//media/capture/mojom/typemaps.gni", "//media/mojo/interfaces/typemaps.gni", - "//mojo/common/typemaps.gni", "//mojo/public/cpp/base/typemaps.gni", "//mojo/public/cpp/bindings/tests/chromium_typemaps.gni", "//net/interfaces/typemaps.gni", diff --git a/services/data_decoder/public/mojom/BUILD.gn b/services/data_decoder/public/mojom/BUILD.gn index edfd0750601e76..916eb68232a014 100644 --- a/services/data_decoder/public/mojom/BUILD.gn +++ b/services/data_decoder/public/mojom/BUILD.gn @@ -13,7 +13,6 @@ mojom("mojom") { public_deps = [ ":constants", - "//mojo/common:common_custom_types", "//mojo/public/mojom/base", "//skia/public/interfaces", "//ui/gfx/geometry/mojo", diff --git a/services/file/BUILD.gn b/services/file/BUILD.gn index 70718c8716ba40..2fe2ea25f06929 100644 --- a/services/file/BUILD.gn +++ b/services/file/BUILD.gn @@ -21,7 +21,6 @@ source_set("lib") { "//components/services/filesystem/public/interfaces", "//components/services/leveldb:lib", "//components/services/leveldb/public/interfaces", - "//mojo/common", "//mojo/public/cpp/system", "//services/file/public/mojom", "//services/service_manager/public/cpp", diff --git a/services/network/public/cpp/BUILD.gn b/services/network/public/cpp/BUILD.gn index 7f12ea093b1f07..3fd0ef42e6ddab 100644 --- a/services/network/public/cpp/BUILD.gn +++ b/services/network/public/cpp/BUILD.gn @@ -57,7 +57,6 @@ component("cpp") { "//base", "//components/prefs", "//ipc", - "//mojo/common", "//services/proxy_resolver/public/mojom", ] diff --git a/services/preferences/BUILD.gn b/services/preferences/BUILD.gn index 0681fefc0663d5..9e6abf3953fd97 100644 --- a/services/preferences/BUILD.gn +++ b/services/preferences/BUILD.gn @@ -23,7 +23,6 @@ source_set("preferences") { ] deps = [ "//components/prefs", - "//mojo/common:values_struct_traits", "//services/preferences/public/cpp", "//services/preferences/public/cpp/lib", "//services/preferences/public/mojom", diff --git a/services/preferences/persistent_pref_store_impl.cc b/services/preferences/persistent_pref_store_impl.cc index d291ee810cdcba..68f9b1a9634048 100644 --- a/services/preferences/persistent_pref_store_impl.cc +++ b/services/preferences/persistent_pref_store_impl.cc @@ -10,7 +10,6 @@ #include "base/stl_util.h" #include "base/values.h" #include "components/prefs/persistent_pref_store.h" -#include "mojo/common/values_struct_traits.h" #include "mojo/public/cpp/bindings/binding.h" #include "services/preferences/public/cpp/lib/util.h" diff --git a/services/preferences/public/cpp/BUILD.gn b/services/preferences/public/cpp/BUILD.gn index 1c27292c873286..307dd8fde62a82 100644 --- a/services/preferences/public/cpp/BUILD.gn +++ b/services/preferences/public/cpp/BUILD.gn @@ -28,7 +28,6 @@ source_set("cpp") { ] deps = [ - "//mojo/common:values_struct_traits", "//mojo/public/cpp/bindings", "//services/preferences/public/cpp/lib", ] diff --git a/services/preferences/public/cpp/persistent_pref_store_client.cc b/services/preferences/public/cpp/persistent_pref_store_client.cc index 0df6d62f2982df..8c83478f5c8ca2 100644 --- a/services/preferences/public/cpp/persistent_pref_store_client.cc +++ b/services/preferences/public/cpp/persistent_pref_store_client.cc @@ -6,8 +6,6 @@ #include "base/values.h" #include "components/prefs/pref_registry.h" -#include "mojo/common/values.mojom.h" -#include "mojo/common/values_struct_traits.h" #include "mojo/public/cpp/bindings/sync_call_restrictions.h" #include "services/preferences/public/cpp/pref_registry_serializer.h" diff --git a/services/preferences/public/mojom/BUILD.gn b/services/preferences/public/mojom/BUILD.gn index d512a9eb49eecc..8c6fcd0fa0a0be 100644 --- a/services/preferences/public/mojom/BUILD.gn +++ b/services/preferences/public/mojom/BUILD.gn @@ -10,7 +10,6 @@ mojom("mojom") { "tracked_preference_validation_delegate.mojom", ] public_deps = [ - "//mojo/common:common_custom_types", "//mojo/public/mojom/base", ] } diff --git a/services/tracing/BUILD.gn b/services/tracing/BUILD.gn index 1cf95aa969b1bb..cf4cf13174d18f 100644 --- a/services/tracing/BUILD.gn +++ b/services/tracing/BUILD.gn @@ -24,7 +24,6 @@ source_set("lib") { public_deps = [ "//base", - "//mojo/common", "//mojo/public/cpp/bindings", "//services/tracing/public/cpp", ] diff --git a/services/ui/DEPS b/services/ui/DEPS index 5ccd8a23ad2c89..c1d47ca8219fe9 100644 --- a/services/ui/DEPS +++ b/services/ui/DEPS @@ -5,7 +5,6 @@ include_rules = [ "+components/discardable_memory/public", "+components/viz/common", "+ipc", - "+mojo/common", "+mojo/converters", "+mojo/public", "+services/catalog/public", diff --git a/services/ui/clipboard/BUILD.gn b/services/ui/clipboard/BUILD.gn index 0eabe335094811..112f44cf4dfdc2 100644 --- a/services/ui/clipboard/BUILD.gn +++ b/services/ui/clipboard/BUILD.gn @@ -16,7 +16,6 @@ source_set("lib") { deps = [ "//base", - "//mojo/common", "//mojo/public/cpp/bindings", "//services/service_manager/public/cpp", "//services/ui/public/interfaces", @@ -32,7 +31,6 @@ source_set("tests") { deps = [ "//base", - "//mojo/common", "//services/service_manager/public/cpp", "//services/service_manager/public/cpp:service_test_support", "//services/ui/public/interfaces", diff --git a/services/ui/ime/BUILD.gn b/services/ui/ime/BUILD.gn index 27a7464b261813..bc5c843edd907b 100644 --- a/services/ui/ime/BUILD.gn +++ b/services/ui/ime/BUILD.gn @@ -18,7 +18,6 @@ source_set("lib") { deps = [ "//base", - "//mojo/common", "//mojo/public/cpp/bindings", "//services/service_manager/public/cpp", "//services/ui/public/interfaces", @@ -34,7 +33,6 @@ source_set("tests") { deps = [ "//base", - "//mojo/common", "//services/service_manager/public/cpp", "//services/service_manager/public/cpp:service_test_support", "//services/ui/public/interfaces", diff --git a/services/ui/ws/BUILD.gn b/services/ui/ws/BUILD.gn index 6be10f97b56484..1ec50e915ae18b 100644 --- a/services/ui/ws/BUILD.gn +++ b/services/ui/ws/BUILD.gn @@ -229,7 +229,6 @@ static_library("test_support") { "//base/test:test_config", "//base/test:test_support", "//components/viz/test:test_support", - "//mojo/common", "//mojo/public/cpp/bindings:bindings", "//services/service_manager/public/cpp", "//services/service_manager/public/cpp:service_test_support", diff --git a/services/ui/ws2/BUILD.gn b/services/ui/ws2/BUILD.gn index 64f60841427616..5eb6356b2a7d5a 100644 --- a/services/ui/ws2/BUILD.gn +++ b/services/ui/ws2/BUILD.gn @@ -68,7 +68,6 @@ static_library("test_support") { "//base", "//base/test:test_config", "//components/viz/test:test_support", - "//mojo/common", "//mojo/public/cpp/bindings:bindings", "//services/service_manager/public/cpp", "//services/service_manager/public/cpp:service_test_support", diff --git a/storage/browser/BUILD.gn b/storage/browser/BUILD.gn index dab39aa2d0250c..80bd20eaea48e1 100644 --- a/storage/browser/BUILD.gn +++ b/storage/browser/BUILD.gn @@ -304,7 +304,6 @@ source_set("unittests") { ":test_support", "//base/test:test_support", "//components/services/filesystem/public/interfaces", - "//mojo/common", "//mojo/edk", "//net:test_support", "//services/network/public/cpp", @@ -357,7 +356,6 @@ static_library("test_support") { deps = [ ":browser", "//base/test:test_support", - "//mojo/common", "//net:test_support", "//testing/gtest", "//third_party/leveldatabase", diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn index 14edbaf69b349d..92551f719cc821 100644 --- a/third_party/blink/renderer/platform/BUILD.gn +++ b/third_party/blink/renderer/platform/BUILD.gn @@ -1956,7 +1956,6 @@ jumbo_source_set("blink_platform_unittests_sources") { "//cc:test_support", "//cc/blink", "//device/base/synchronization", - "//mojo/common:test_common_custom_types_blink", "//mojo/edk", "//mojo/public/cpp/bindings/tests:for_blink_tests", "//mojo/public/cpp/test_support:test_utils", diff --git a/third_party/blink/renderer/platform/mojo/DEPS b/third_party/blink/renderer/platform/mojo/DEPS index 1956952f043e03..294890dbc2a347 100644 --- a/third_party/blink/renderer/platform/mojo/DEPS +++ b/third_party/blink/renderer/platform/mojo/DEPS @@ -11,8 +11,6 @@ include_rules = [ "+base/message_loop/message_loop_current.h", "+base/observer_list.h", "+base/strings/string16.h", - "+mojo/common/big_string.mojom-blink.h", - "+mojo/common/test_common_custom_types.mojom-blink.h", "+mojo/public/cpp/base/time_mojom_traits.h", "+mojo/public/cpp/bindings/binding.h", "+mojo/public/mojom/base/string16.mojom-blink.h", diff --git a/third_party/blink/renderer/platform/mojo/big_string_mojom_traits_test.cc b/third_party/blink/renderer/platform/mojo/big_string_mojom_traits_test.cc index 4253e2fd8996bc..6548da748c0d00 100644 --- a/third_party/blink/renderer/platform/mojo/big_string_mojom_traits_test.cc +++ b/third_party/blink/renderer/platform/mojo/big_string_mojom_traits_test.cc @@ -3,7 +3,6 @@ // found in the LICENSE file. #include "base/rand_util.h" -#include "mojo/common/test_common_custom_types.mojom-blink.h" #include "mojo/public/cpp/base/big_buffer_mojom_traits.h" #include "mojo/public/cpp/test_support/test_utils.h" #include "mojo/public/mojom/base/big_string.mojom-blink.h" diff --git a/third_party/blink/renderer/platform/mojo/blink_typemaps.gni b/third_party/blink/renderer/platform/mojo/blink_typemaps.gni index b69eb6f9e36447..1bf76441abac7a 100644 --- a/third_party/blink/renderer/platform/mojo/blink_typemaps.gni +++ b/third_party/blink/renderer/platform/mojo/blink_typemaps.gni @@ -5,7 +5,6 @@ typemaps = [ "//mojo/public/cpp/base/file_info.typemap", "//mojo/public/cpp/base/file_path.typemap", - "//mojo/common/values.typemap", "//third_party/blink/renderer/core/messaging/blink_cloneable_message.typemap", "//third_party/blink/renderer/core/messaging/blink_transferable_message.typemap", "//third_party/blink/renderer/platform/blob/serialized_blob.typemap", diff --git a/third_party/blink/renderer/platform/mojo/string16_mojom_traits_test.cc b/third_party/blink/renderer/platform/mojo/string16_mojom_traits_test.cc index 8aa308d79c20ee..8018f6c7279107 100644 --- a/third_party/blink/renderer/platform/mojo/string16_mojom_traits_test.cc +++ b/third_party/blink/renderer/platform/mojo/string16_mojom_traits_test.cc @@ -7,7 +7,6 @@ #include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/rand_util.h" -#include "mojo/common/test_common_custom_types.mojom-blink.h" #include "mojo/public/cpp/base/big_buffer_mojom_traits.h" #include "mojo/public/cpp/bindings/binding_set.h" #include "mojo/public/cpp/test_support/test_utils.h" diff --git a/ui/accessibility/BUILD.gn b/ui/accessibility/BUILD.gn index 634594113c569c..85604a583bb838 100644 --- a/ui/accessibility/BUILD.gn +++ b/ui/accessibility/BUILD.gn @@ -197,7 +197,6 @@ test("accessibility_unittests") { ":test_support", "//base", "//base/test:test_support", - "//mojo/common", "//mojo/edk", "//mojo/edk/test:test_support", "//mojo/public/cpp/test_support:test_utils", diff --git a/ui/aura/BUILD.gn b/ui/aura/BUILD.gn index c1eaaf3e8cc02f..e6aa8fcbe02501 100644 --- a/ui/aura/BUILD.gn +++ b/ui/aura/BUILD.gn @@ -389,7 +389,6 @@ test("aura_unittests") { ":test_support", "//base/test:test_support", "//components/viz/client", - "//mojo/common", "//mojo/edk", "//net", "//services/ui/common:task_runner_test_base", diff --git a/ui/aura/DEPS b/ui/aura/DEPS index 0302ae3188329d..a6548b4cdbe5d9 100644 --- a/ui/aura/DEPS +++ b/ui/aura/DEPS @@ -7,7 +7,6 @@ include_rules = [ "+components/viz/client", "+components/viz/common", "+components/viz/host", - "+mojo/common", "+mojo/public/cpp", "+net/base/filename_util.h", "+services/service_manager/public/cpp", diff --git a/ui/base/accelerators/mojo/DEPS b/ui/base/accelerators/mojo/DEPS index 6cbc2015d059f3..8949f97d10d02e 100644 --- a/ui/base/accelerators/mojo/DEPS +++ b/ui/base/accelerators/mojo/DEPS @@ -1,4 +1,3 @@ include_rules = [ - "+mojo/common", "+mojo/public/cpp/base", ] diff --git a/ui/events/mojo/DEPS b/ui/events/mojo/DEPS index 20e5cd0a15deed..c58363c05bd003 100644 --- a/ui/events/mojo/DEPS +++ b/ui/events/mojo/DEPS @@ -1,5 +1,4 @@ include_rules = [ - "+mojo/common", "+mojo/public", "+services/ui/public/interfaces", "+ui/events", diff --git a/ui/latency/mojo/DEPS b/ui/latency/mojo/DEPS index 248dbde5ece569..77a276283fed98 100644 --- a/ui/latency/mojo/DEPS +++ b/ui/latency/mojo/DEPS @@ -1,5 +1,4 @@ include_rules = [ - "+mojo/common", "+mojo/public", "+ui/gfx/geometry/mojo", "+ui/latency", diff --git a/ui/message_center/public/mojo/DEPS b/ui/message_center/public/mojo/DEPS deleted file mode 100644 index 6cfa565facaa5b..00000000000000 --- a/ui/message_center/public/mojo/DEPS +++ /dev/null @@ -1,3 +0,0 @@ -include_rules = [ - "+mojo/common", -] diff --git a/ui/views/mus/BUILD.gn b/ui/views/mus/BUILD.gn index dfe239c16d509d..34545475828254 100644 --- a/ui/views/mus/BUILD.gn +++ b/ui/views/mus/BUILD.gn @@ -49,7 +49,6 @@ jumbo_component("mus") { "//base:i18n", "//base/third_party/dynamic_annotations", "//cc", - "//mojo/common", "//mojo/public/cpp/bindings", "//net", "//services/catalog/public/cpp", diff --git a/ui/views/mus/DEPS b/ui/views/mus/DEPS index 21ea014c764525..5f4b90e8863ee7 100644 --- a/ui/views/mus/DEPS +++ b/ui/views/mus/DEPS @@ -4,7 +4,6 @@ include_rules = [ "+components/services/font/public", "+components/gpu", "+mojo/cc", - "+mojo/common", "+mojo/converters", "+mojo/edk/embedder", "+mojo/public", diff --git a/ui/webui/BUILD.gn b/ui/webui/BUILD.gn index 7757ffde500558..16f9b7c9a963ee 100644 --- a/ui/webui/BUILD.gn +++ b/ui/webui/BUILD.gn @@ -11,7 +11,6 @@ static_library("webui") { deps = [ "//base", "//content/public/browser", - "//mojo/common", "//services/service_manager/public/cpp", ] }