Browse Source

chore: iwyu mojom-forward header files (#43741)

* chore: iwyu mojom.h headers

* fixup! chore: iwyu mojom.h headers

make previously-indirect include dependency direct

* fixup! fixup! chore: iwyu mojom.h headers

make previously-indirect include dependency direct
Charles Kerr 7 months ago
parent
commit
233724fe00
36 changed files with 47 additions and 34 deletions
  1. 2 0
      shell/browser/api/electron_api_cookies.h
  2. 1 0
      shell/browser/api/electron_api_power_monitor_win.cc
  3. 2 2
      shell/browser/api/electron_api_session.h
  4. 2 2
      shell/browser/api/electron_api_web_contents.h
  5. 1 0
      shell/browser/api/electron_api_web_frame_main.h
  6. 1 2
      shell/browser/electron_browser_context.h
  7. 1 0
      shell/browser/electron_browser_main_parts.cc
  8. 4 2
      shell/browser/electron_browser_main_parts.h
  9. 0 1
      shell/browser/extended_web_contents_observer.h
  10. 1 1
      shell/browser/extensions/api/scripting/scripting_api.h
  11. 3 1
      shell/browser/extensions/api/streams_private/streams_private_api.h
  12. 1 0
      shell/browser/hid/electron_hid_delegate.cc
  13. 2 0
      shell/browser/hid/hid_chooser_controller.cc
  14. 2 2
      shell/browser/hid/hid_chooser_controller.h
  15. 2 2
      shell/browser/media/media_capture_devices_dispatcher.h
  16. 0 1
      shell/browser/native_window.h
  17. 0 1
      shell/browser/native_window_mac.h
  18. 1 1
      shell/browser/net/electron_url_loader_factory.h
  19. 2 2
      shell/browser/net/network_context_service.h
  20. 1 0
      shell/browser/net/proxying_url_loader_factory.cc
  21. 1 1
      shell/browser/net/proxying_url_loader_factory.h
  22. 0 1
      shell/browser/net/resolve_host_function.h
  23. 1 0
      shell/browser/net/system_network_context_manager.cc
  24. 2 3
      shell/browser/net/system_network_context_manager.h
  25. 1 1
      shell/browser/serial/serial_chooser_controller.h
  26. 0 1
      shell/browser/ui/drag_util.h
  27. 1 0
      shell/browser/ui/inspectable_web_contents.cc
  28. 1 1
      shell/browser/ui/inspectable_web_contents_view.h
  29. 1 0
      shell/browser/ui/win/taskbar_host.cc
  30. 1 1
      shell/browser/usb/usb_chooser_controller.h
  31. 2 0
      shell/browser/web_contents_permission_helper.cc
  32. 1 0
      shell/common/gin_converters/content_converter.cc
  33. 1 1
      shell/common/gin_converters/content_converter.h
  34. 2 0
      shell/common/gin_converters/net_converter.cc
  35. 3 3
      shell/common/gin_converters/net_converter.h
  36. 0 1
      shell/common/gin_helper/event_emitter.h

+ 2 - 0
shell/browser/api/electron_api_cookies.h

@@ -12,6 +12,8 @@
 #include "base/values.h"
 #include "shell/browser/event_emitter_mixin.h"
 
+class GURL;
+
 namespace gin {
 template <typename T>
 class Handle;

+ 1 - 0
shell/browser/api/electron_api_power_monitor_win.cc

@@ -7,6 +7,7 @@
 #include <windows.h>
 #include <wtsapi32.h>
 
+#include "base/logging.h"
 #include "base/win/windows_types.h"
 #include "base/win/wrapped_window_proc.h"
 #include "content/public/browser/browser_task_traits.h"

+ 2 - 2
shell/browser/api/electron_api_session.h

@@ -16,8 +16,8 @@
 #include "content/public/browser/download_manager.h"
 #include "electron/buildflags/buildflags.h"
 #include "gin/wrappable.h"
-#include "services/network/public/mojom/host_resolver.mojom.h"
-#include "services/network/public/mojom/ssl_config.mojom.h"
+#include "services/network/public/mojom/host_resolver.mojom-forward.h"
+#include "services/network/public/mojom/ssl_config.mojom-forward.h"
 #include "shell/browser/event_emitter_mixin.h"
 #include "shell/browser/net/resolve_proxy_helper.h"
 #include "shell/common/gin_helper/cleaned_up_at_exit.h"

+ 2 - 2
shell/browser/api/electron_api_web_contents.h

@@ -22,7 +22,7 @@
 #include "chrome/browser/devtools/devtools_file_system_indexer.h"
 #include "chrome/browser/ui/exclusive_access/exclusive_access_context.h"  // nogncheck
 #include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h"
-#include "content/common/frame.mojom.h"
+#include "content/common/frame.mojom-forward.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/devtools_agent_host.h"
 #include "content/public/browser/javascript_dialog_manager.h"
@@ -51,7 +51,7 @@
 #endif
 
 #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
-#include "extensions/common/mojom/view_type.mojom.h"
+#include "extensions/common/mojom/view_type.mojom-forward.h"
 
 namespace extensions {
 class ScriptExecutor;

+ 1 - 0
shell/browser/api/electron_api_web_frame_main.h

@@ -16,6 +16,7 @@
 #include "mojo/public/cpp/bindings/pending_receiver.h"
 #include "mojo/public/cpp/bindings/remote.h"
 #include "shell/browser/event_emitter_mixin.h"
+#include "shell/common/api/api.mojom.h"
 #include "shell/common/gin_helper/constructible.h"
 #include "shell/common/gin_helper/pinnable.h"
 #include "third_party/blink/public/mojom/page/page_visibility_state.mojom-forward.h"

+ 1 - 2
shell/browser/electron_browser_context.h

@@ -21,8 +21,7 @@
 #include "electron/buildflags/buildflags.h"
 #include "electron/shell/browser/media/media_device_id_salt.h"
 #include "mojo/public/cpp/bindings/remote.h"
-#include "services/network/public/mojom/network_context.mojom.h"
-#include "services/network/public/mojom/url_loader_factory.mojom.h"
+#include "services/network/public/mojom/ssl_config.mojom.h"
 #include "third_party/blink/public/common/permissions/permission_utils.h"
 
 class PrefService;

+ 1 - 0
shell/browser/electron_browser_main_parts.cc

@@ -68,6 +68,7 @@
 #include "ui/base/ui_base_switches.h"
 #include "ui/color/color_provider_manager.h"
 #include "ui/display/screen.h"
+#include "ui/views/layout/layout_provider.h"
 #include "url/url_util.h"
 
 #if defined(USE_AURA)

+ 4 - 2
shell/browser/electron_browser_main_parts.h

@@ -11,12 +11,10 @@
 
 #include "base/functional/callback_forward.h"
 #include "base/task/single_thread_task_runner.h"
-#include "content/public/browser/browser_context.h"
 #include "content/public/browser/browser_main_parts.h"
 #include "electron/buildflags/buildflags.h"
 #include "mojo/public/cpp/bindings/remote.h"
 #include "services/device/public/mojom/geolocation_control.mojom.h"
-#include "ui/views/layout/layout_provider.h"
 
 class BrowserProcessImpl;
 class IconManager;
@@ -49,6 +47,10 @@ class LinuxUiGetter;
 class DarkModeManagerLinux;
 }  // namespace ui
 
+namespace views {
+class LayoutProvider;
+}  // namespace views
+
 namespace electron {
 
 class Browser;

+ 0 - 1
shell/browser/extended_web_contents_observer.h

@@ -8,7 +8,6 @@
 #include <string>
 
 #include "base/observer_list_types.h"
-#include "electron/shell/common/api/api.mojom.h"
 
 namespace gfx {
 class Rect;

+ 1 - 1
shell/browser/extensions/api/scripting/scripting_api.h

@@ -15,7 +15,7 @@
 #include "extensions/browser/extension_function.h"
 #include "extensions/browser/script_executor.h"
 #include "extensions/browser/scripting_utils.h"
-#include "extensions/common/mojom/code_injection.mojom.h"
+#include "extensions/common/mojom/code_injection.mojom-forward.h"
 #include "extensions/common/user_script.h"
 
 namespace extensions {

+ 3 - 1
shell/browser/extensions/api/streams_private/streams_private_api.h

@@ -7,7 +7,9 @@
 
 #include <string>
 
-#include "third_party/blink/public/mojom/loader/transferrable_url_loader.mojom.h"
+#include "third_party/blink/public/mojom/loader/transferrable_url_loader.mojom-forward.h"
+
+class GURL;
 
 namespace extensions {
 

+ 1 - 0
shell/browser/hid/electron_hid_delegate.cc

@@ -20,6 +20,7 @@
 #include "shell/browser/hid/hid_chooser_controller.h"
 #include "shell/browser/web_contents_permission_helper.h"
 #include "third_party/blink/public/common/permissions/permission_utils.h"
+#include "third_party/blink/public/mojom/hid/hid.mojom.h"
 
 #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
 #include "extensions/common/constants.h"

+ 2 - 0
shell/browser/hid/hid_chooser_controller.cc

@@ -25,6 +25,8 @@
 #include "shell/common/gin_converters/hid_device_info_converter.h"
 #include "shell/common/gin_converters/value_converter.h"
 #include "shell/common/node_util.h"
+#include "third_party/blink/public/mojom/devtools/console_message.mojom.h"
+#include "third_party/blink/public/mojom/hid/hid.mojom.h"
 #include "ui/base/l10n/l10n_util.h"
 
 namespace {

+ 2 - 2
shell/browser/hid/hid_chooser_controller.h

@@ -18,8 +18,8 @@
 #include "services/device/public/mojom/hid.mojom-forward.h"
 #include "shell/browser/hid/hid_chooser_context.h"
 #include "shell/common/gin_converters/frame_converter.h"
-#include "third_party/blink/public/mojom/devtools/console_message.mojom.h"
-#include "third_party/blink/public/mojom/hid/hid.mojom.h"
+#include "third_party/blink/public/mojom/devtools/console_message.mojom-forward.h"
+#include "third_party/blink/public/mojom/hid/hid.mojom-forward.h"
 
 namespace content {
 class RenderFrameHost;

+ 2 - 2
shell/browser/media/media_capture_devices_dispatcher.h

@@ -5,10 +5,10 @@
 #ifndef ELECTRON_SHELL_BROWSER_MEDIA_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_
 #define ELECTRON_SHELL_BROWSER_MEDIA_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_
 
+#include "base/no_destructor.h"
 #include "components/webrtc/media_stream_device_enumerator_impl.h"
 #include "content/public/browser/media_observer.h"
-#include "third_party/blink/public/common/mediastream/media_stream_request.h"
-#include "third_party/blink/public/mojom/mediastream/media_stream.mojom.h"
+#include "third_party/blink/public/mojom/mediastream/media_stream.mojom-forward.h"
 
 namespace electron {
 

+ 0 - 1
shell/browser/native_window.h

@@ -18,7 +18,6 @@
 #include "base/supports_user_data.h"
 #include "content/public/browser/desktop_media_id.h"
 #include "content/public/browser/web_contents_user_data.h"
-#include "electron/shell/common/api/api.mojom.h"
 #include "extensions/browser/app_window/size_constraints.h"
 #include "shell/browser/native_window_observer.h"
 #include "ui/views/widget/widget_delegate.h"

+ 0 - 1
shell/browser/native_window_mac.h

@@ -13,7 +13,6 @@
 #include <vector>
 
 #include "base/memory/raw_ptr.h"
-#include "electron/shell/common/api/api.mojom.h"
 #include "shell/browser/native_window.h"
 #include "third_party/skia/include/core/SkRegion.h"
 #include "ui/display/display_observer.h"

+ 1 - 1
shell/browser/net/electron_url_loader_factory.h

@@ -19,7 +19,7 @@
 #include "services/network/public/cpp/self_deleting_url_loader_factory.h"
 #include "services/network/public/mojom/url_loader.mojom.h"
 #include "services/network/public/mojom/url_loader_factory.mojom.h"
-#include "services/network/public/mojom/url_response_head.mojom.h"
+#include "services/network/public/mojom/url_response_head.mojom-forward.h"
 #include "v8/include/v8-array-buffer.h"
 
 namespace gin {

+ 2 - 2
shell/browser/net/network_context_service.h

@@ -8,8 +8,8 @@
 #include "base/memory/raw_ptr.h"
 #include "chrome/browser/net/proxy_config_monitor.h"
 #include "components/keyed_service/core/keyed_service.h"
-#include "services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom.h"
-#include "services/network/public/mojom/network_context.mojom.h"
+#include "services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom-forward.h"
+#include "services/network/public/mojom/network_context.mojom-forward.h"
 
 namespace base {
 class FilePath;

+ 1 - 0
shell/browser/net/proxying_url_loader_factory.cc

@@ -22,6 +22,7 @@
 #include "net/url_request/redirect_info.h"
 #include "services/network/public/cpp/features.h"
 #include "services/network/public/mojom/early_hints.mojom.h"
+#include "services/network/public/mojom/url_response_head.mojom.h"
 #include "shell/browser/net/asar/asar_url_loader.h"
 #include "shell/common/options_switches.h"
 #include "url/origin.h"

+ 1 - 1
shell/browser/net/proxying_url_loader_factory.h

@@ -27,7 +27,7 @@
 #include "services/network/public/mojom/network_context.mojom.h"
 #include "services/network/public/mojom/url_loader.mojom.h"
 #include "services/network/public/mojom/url_loader_factory.mojom.h"
-#include "services/network/public/mojom/url_response_head.mojom.h"
+#include "services/network/public/mojom/url_response_head.mojom-forward.h"
 #include "services/network/url_loader_factory.h"
 #include "shell/browser/net/electron_url_loader_factory.h"
 #include "shell/browser/net/web_request_api_interface.h"

+ 0 - 1
shell/browser/net/resolve_host_function.h

@@ -14,7 +14,6 @@
 #include "mojo/public/cpp/bindings/receiver.h"
 #include "services/network/public/cpp/resolve_host_client_base.h"
 #include "services/network/public/mojom/host_resolver.mojom.h"
-#include "services/network/public/mojom/network_context.mojom.h"
 
 namespace net {
 class AddressList;

+ 1 - 0
shell/browser/net/system_network_context_manager.cc

@@ -33,6 +33,7 @@
 #include "services/network/public/cpp/features.h"
 #include "services/network/public/cpp/shared_url_loader_factory.h"
 #include "services/network/public/mojom/network_context.mojom.h"
+#include "services/network/public/mojom/url_response_head.mojom.h"
 #include "shell/browser/browser.h"
 #include "shell/browser/electron_browser_client.h"
 #include "shell/common/application_info.h"

+ 2 - 3
shell/browser/net/system_network_context_manager.h

@@ -10,9 +10,8 @@
 #include "sandbox/policy/features.h"
 #include "services/network/public/cpp/shared_url_loader_factory.h"
 #include "services/network/public/mojom/network_context.mojom.h"
-#include "services/network/public/mojom/network_service.mojom.h"
-#include "services/network/public/mojom/url_loader.mojom.h"
-#include "services/network/public/mojom/url_loader_factory.mojom.h"
+#include "services/network/public/mojom/network_service.mojom-forward.h"
+#include "services/network/public/mojom/url_loader_factory.mojom-forward.h"
 
 namespace electron {
 network::mojom::HttpAuthDynamicParamsPtr CreateHttpAuthDynamicParams();

+ 1 - 1
shell/browser/serial/serial_chooser_controller.h

@@ -15,7 +15,7 @@
 #include "content/public/browser/web_contents_observer.h"
 #include "services/device/public/mojom/serial.mojom-forward.h"
 #include "shell/browser/serial/serial_chooser_context.h"
-#include "third_party/blink/public/mojom/serial/serial.mojom.h"
+#include "third_party/blink/public/mojom/serial/serial.mojom-forward.h"
 
 namespace content {
 class RenderFrameHost;

+ 0 - 1
shell/browser/ui/drag_util.h

@@ -8,7 +8,6 @@
 #include <memory>
 #include <vector>
 
-#include "electron/shell/common/api/api.mojom.h"
 #include "third_party/blink/public/mojom/page/draggable_region.mojom-forward.h"
 #include "ui/gfx/native_widget_types.h"
 

+ 1 - 0
shell/browser/ui/inspectable_web_contents.cc

@@ -41,6 +41,7 @@
 #include "services/network/public/cpp/simple_url_loader.h"
 #include "services/network/public/cpp/simple_url_loader_stream_consumer.h"
 #include "services/network/public/cpp/wrapper_shared_url_loader_factory.h"
+#include "services/network/public/mojom/url_response_head.mojom.h"
 #include "shell/browser/api/electron_api_web_contents.h"
 #include "shell/browser/native_window_views.h"
 #include "shell/browser/net/asar/asar_url_loader_factory.h"

+ 1 - 1
shell/browser/ui/inspectable_web_contents_view.h

@@ -9,7 +9,7 @@
 #include <string>
 
 #include "base/memory/raw_ptr.h"
-#include "electron/shell/common/api/api.mojom.h"
+#include "build/build_config.h"
 
 #if defined(TOOLKIT_VIEWS) && !BUILDFLAG(IS_MAC)
 #include "ui/views/view.h"

+ 1 - 0
shell/browser/ui/win/taskbar_host.cc

@@ -13,6 +13,7 @@
 #include "skia/ext/image_operations.h"
 #include "third_party/skia/include/core/SkBitmap.h"
 #include "third_party/skia/include/core/SkCanvas.h"
+#include "third_party/skia/include/core/SkImage.h"
 #include "third_party/skia/include/core/SkRRect.h"
 #include "ui/display/win/screen_win.h"
 #include "ui/gfx/icon_util.h"

+ 1 - 1
shell/browser/usb/usb_chooser_controller.h

@@ -10,7 +10,7 @@
 #include "base/memory/weak_ptr.h"
 #include "base/scoped_observation.h"
 #include "content/public/browser/web_contents_observer.h"
-#include "services/device/public/mojom/usb_device.mojom.h"
+#include "services/device/public/mojom/usb_device.mojom-forward.h"
 #include "shell/browser/usb/usb_chooser_context.h"
 #include "third_party/blink/public/mojom/usb/web_usb_service.mojom.h"
 #include "url/origin.h"

+ 2 - 0
shell/browser/web_contents_permission_helper.cc

@@ -15,6 +15,8 @@
 #include "shell/browser/electron_browser_context.h"
 #include "shell/browser/electron_permission_manager.h"
 #include "shell/browser/media/media_capture_devices_dispatcher.h"
+#include "third_party/blink/public/common/mediastream/media_stream_request.h"
+#include "third_party/blink/public/mojom/mediastream/media_stream.mojom.h"
 
 #if BUILDFLAG(IS_MAC)
 #include "chrome/browser/media/webrtc/system_media_capture_permissions_mac.h"

+ 1 - 0
shell/common/gin_converters/content_converter.cc

@@ -20,6 +20,7 @@
 #include "shell/common/gin_converters/gurl_converter.h"
 #include "shell/common/gin_helper/dictionary.h"
 #include "third_party/blink/public/common/context_menu_data/untrustworthy_context_menu_params.h"
+#include "third_party/blink/public/mojom/permissions/permission_status.mojom.h"
 #include "ui/events/keycodes/dom/keycode_converter.h"
 #include "ui/events/keycodes/keyboard_code_conversion.h"
 

+ 1 - 1
shell/common/gin_converters/content_converter.h

@@ -12,7 +12,7 @@
 #include "gin/converter.h"
 #include "third_party/blink/public/common/permissions/permission_utils.h"
 #include "third_party/blink/public/mojom/choosers/popup_menu.mojom.h"
-#include "third_party/blink/public/mojom/permissions/permission_status.mojom.h"
+#include "third_party/blink/public/mojom/permissions/permission_status.mojom-forward.h"
 #include "ui/base/ui_base_types.h"
 
 namespace content {

+ 2 - 0
shell/common/gin_converters/net_converter.cc

@@ -26,6 +26,8 @@
 #include "services/network/public/cpp/resource_request.h"
 #include "services/network/public/cpp/resource_request_body.h"
 #include "services/network/public/mojom/chunked_data_pipe_getter.mojom.h"
+#include "services/network/public/mojom/fetch_api.mojom.h"
+#include "services/network/public/mojom/url_request.mojom.h"
 #include "shell/browser/api/electron_api_data_pipe_holder.h"
 #include "shell/common/gin_converters/gurl_converter.h"
 #include "shell/common/gin_converters/std_converter.h"

+ 3 - 3
shell/common/gin_converters/net_converter.h

@@ -9,9 +9,8 @@
 #include <vector>
 
 #include "gin/converter.h"
-#include "services/network/public/mojom/fetch_api.mojom.h"
+#include "services/network/public/mojom/host_resolver.mojom-forward.h"
 #include "services/network/public/mojom/host_resolver.mojom.h"
-#include "services/network/public/mojom/url_request.mojom.h"
 #include "shell/browser/net/cert_verifier_client.h"
 
 namespace net {
@@ -24,7 +23,8 @@ class HttpVersion;
 
 namespace network {
 struct ResourceRequest;
-}
+class ResourceRequestBody;
+}  // namespace network
 
 namespace gin {
 

+ 0 - 1
shell/common/gin_helper/event_emitter.h

@@ -8,7 +8,6 @@
 #include <string_view>
 #include <utility>
 
-#include "electron/shell/common/api/api.mojom.h"
 #include "gin/handle.h"
 #include "shell/common/gin_helper/event.h"
 #include "shell/common/gin_helper/event_emitter_caller.h"