Browse Source

chore: remove more unused #include calls (#43000)

* chore: in shell/renderer/renderer_client_base.h, remove include media/base/key_systems_support_registration.h

last use removed in c670e38b (##41610)

* chore: iwyu electron/fuses.h

* chore: iwyu media/base/video_frame.h

* chore: iwyu base/functional/callback.h

* chore: iwyu base/task/cancelable_task_tracker.h

* chore: iwyu shell/browser/draggable_region_provider.h

* chore: iwyu shell/browser/ui/inspectable_web_contents_view.h

* chore: iwyu ui/aura/window.h

* chore: iwyu ui/base/win/shell.h

* chore: iwyu ui/display/win/screen_win.h

* chore: iwyu ui/gfx/geometry/insets.h

* chore: iwyu ui/display/display.h

* chore: iwyu ui/gfx/geometry/skia_conversions.h

* chore: iwyu ui/gfx/geometry/rect_conversions.h

* chore: iwyu ui/gfx/geometry/point.h

* chore: iwyu ui/gfx/scoped_canvas.h

* chore: iwyu ui/gfx/image/image.h

* chore: iwyu ui/accessibility/ax_node_data.h

* chore: iwyu ui/views/animation/ink_drop_highlight.h

* chore: iwyu ui/gfx/font_list.h

* chore: iwyu ui/linux/nav_button_provider.h

* chore: iwyu shell/browser/ui/views/frameless_view.h

* chore: iwyu services/metrics/public/cpp/ukm_source_id.h

* chore: iwyu net/http/http_util.h

* chore: iwyu net/base/mime_util.h

* chore: iwyu content/public/common/content_client.h

* chore: iwyu <list>

* chore: iwyu <optional>

* chore: iwyu <memory>

* chore: iwyu base/files/file_path.h

* chore: iwyu ui/base/cursor/cursor.h

* chore: iwyu build/build_config.h

* chore: iwyu content/public/browser/web_contents.h

* chore: iwyu shell/browser/hid/hid_chooser_context.h

* chore: iwyu shell/common/platform_util.h

* chore: iwyu base/task/single_thread_task_runner.h

* chore: iwyu content/browser/renderer_host/render_widget_host_impl.h

* chore: iwyu content/public/browser/render_widget_host.h

* chore: iwyu shell/browser/electron_browser_context.h

* chore: iwyu content/public/browser/web_contents_observer.h

* chore: iwyu content/public/browser/render_frame_host.h

* chore: iwyu content/public/browser/media_stream_request.h

* chore: iwyu chrome/common/chrome_paths.h

* chore: iwyu chrome/browser/icon_manager.h

* chore: iwyu printing/print_settings.h

* chore: iwyu renderer/pepper_helper.h

* chore: iwyu shell/browser/api/process_metric.h

* chore: iwyu shell/browser/electron_browser_client.h

* chore: iwyu shell/browser/electron_browser_context.h

* chore: iwyu shell/browser/api/electron_api_session.h

* chore: iwyu shell/browser/api/electron_api_app.h

* chore: iwyu shell/browser/ui/views/client_frame_view_linux.h

* chore: iwyu shell/browser/native_window_views.h

* chore: iwyu base/win/windows_version.h

* chore: iwyu shell/common/electron_paths.h

* chore: iwyu content/public/common/content_switches.h

* chore: iwyu third_party/skia/include/core/SkRRect.h

* chore: iwyu third_party/skia/include/core/SkBitmap.h

* chore: iwyu third_party/skia

* chore: iwyu shell/browser/osr/osr_host_display_client.h

* chore: iwyu shell/browser/login_handler.h

* chore: iwyu shell/browser/javascript_environment.h

* chore: iwyu shell/browser/event_emitter_mixin.h

* fix: mac

* fix: mac

* chore: iwyu base/nix/xdg_util.h

* fix: win

* fix: win

* fix: win

* fix: win
Charles Kerr 8 months ago
parent
commit
aa23198ad8
100 changed files with 106 additions and 146 deletions
  1. 0 2
      shell/app/electron_content_client.cc
  2. 0 1
      shell/app/electron_crash_reporter_client.cc
  3. 4 1
      shell/app/electron_main_delegate.h
  4. 1 1
      shell/app/electron_main_win.cc
  5. 0 1
      shell/app/uv_task_runner.h
  6. 2 5
      shell/browser/api/electron_api_app.cc
  7. 6 2
      shell/browser/api/electron_api_app.h
  8. 2 1
      shell/browser/api/electron_api_app_mac.mm
  9. 0 6
      shell/browser/api/electron_api_browser_window.cc
  10. 0 1
      shell/browser/api/electron_api_crash_reporter.cc
  11. 2 1
      shell/browser/api/electron_api_crash_reporter.h
  12. 0 1
      shell/browser/api/electron_api_debugger.h
  13. 0 1
      shell/browser/api/electron_api_event_emitter.cc
  14. 0 1
      shell/browser/api/electron_api_menu.h
  15. 0 1
      shell/browser/api/electron_api_menu_mac.mm
  16. 0 1
      shell/browser/api/electron_api_net_log.h
  17. 0 1
      shell/browser/api/electron_api_power_monitor_win.cc
  18. 0 1
      shell/browser/api/electron_api_safe_storage.cc
  19. 0 1
      shell/browser/api/electron_api_system_preferences_win.cc
  20. 0 1
      shell/browser/api/electron_api_tray.h
  21. 3 8
      shell/browser/api/electron_api_web_contents.cc
  22. 4 1
      shell/browser/api/electron_api_web_contents.h
  23. 0 1
      shell/browser/api/save_page_handler.cc
  24. 1 0
      shell/browser/auto_updater.cc
  25. 0 2
      shell/browser/auto_updater.h
  26. 0 1
      shell/browser/badging/badge_manager.cc
  27. 0 1
      shell/browser/bluetooth/electron_bluetooth_delegate.cc
  28. 1 1
      shell/browser/bluetooth/electron_bluetooth_delegate.h
  29. 0 2
      shell/browser/browser.cc
  30. 5 2
      shell/browser/browser.h
  31. 1 1
      shell/browser/browser_observer.h
  32. 0 2
      shell/browser/browser_process_impl.cc
  33. 1 1
      shell/browser/browser_win.cc
  34. 0 1
      shell/browser/electron_autofill_driver_factory.cc
  35. 2 1
      shell/browser/electron_browser_client.cc
  36. 1 0
      shell/browser/electron_browser_client.h
  37. 2 4
      shell/browser/electron_browser_main_parts.cc
  38. 0 1
      shell/browser/electron_browser_main_parts_mac.mm
  39. 1 1
      shell/browser/electron_permission_manager.cc
  40. 3 5
      shell/browser/electron_permission_manager.h
  41. 0 1
      shell/browser/extensions/api/management/electron_management_api_delegate.h
  42. 0 1
      shell/browser/extensions/api/pdf_viewer_private/pdf_viewer_private_api.cc
  43. 0 1
      shell/browser/extensions/api/runtime/electron_runtime_api_delegate.cc
  44. 0 1
      shell/browser/extensions/api/streams_private/streams_private_api.cc
  45. 3 1
      shell/browser/extensions/api/tabs/tabs_api.cc
  46. 0 1
      shell/browser/extensions/electron_component_extension_resource_manager.cc
  47. 0 2
      shell/browser/extensions/electron_extensions_browser_client.cc
  48. 0 1
      shell/browser/extensions/electron_extensions_browser_client.h
  49. 0 1
      shell/browser/extensions/electron_messaging_delegate.cc
  50. 0 1
      shell/browser/extensions/electron_process_manager_delegate.cc
  51. 0 1
      shell/browser/fake_location_provider.cc
  52. 0 1
      shell/browser/file_select_helper.cc
  53. 0 2
      shell/browser/file_select_helper.h
  54. 1 0
      shell/browser/hid/electron_hid_delegate.cc
  55. 0 1
      shell/browser/hid/electron_hid_delegate.h
  56. 2 4
      shell/browser/hid/hid_chooser_context.cc
  57. 2 2
      shell/browser/hid/hid_chooser_context.h
  58. 7 1
      shell/browser/hid/hid_chooser_controller.h
  59. 0 2
      shell/browser/linux/unity_service.cc
  60. 0 1
      shell/browser/login_handler.cc
  61. 1 1
      shell/browser/mac/electron_application_delegate.mm
  62. 0 1
      shell/browser/mac/in_app_purchase_observer.h
  63. 0 1
      shell/browser/media/media_capture_devices_dispatcher.h
  64. 1 2
      shell/browser/native_window.cc
  65. 1 2
      shell/browser/native_window.h
  66. 1 0
      shell/browser/native_window_mac.h
  67. 0 1
      shell/browser/native_window_mac.mm
  68. 0 3
      shell/browser/native_window_views.cc
  69. 1 2
      shell/browser/native_window_views_win.cc
  70. 0 2
      shell/browser/net/asar/asar_file_validator.h
  71. 0 1
      shell/browser/net/asar/asar_url_loader.cc
  72. 0 1
      shell/browser/net/electron_url_loader_factory.cc
  73. 1 0
      shell/browser/net/network_context_service.cc
  74. 6 1
      shell/browser/net/network_context_service.h
  75. 1 0
      shell/browser/net/network_context_service_factory.cc
  76. 0 1
      shell/browser/net/proxying_url_loader_factory.cc
  77. 0 1
      shell/browser/net/proxying_url_loader_factory.h
  78. 0 1
      shell/browser/net/proxying_websocket.cc
  79. 0 2
      shell/browser/net/system_network_context_manager.cc
  80. 0 2
      shell/browser/net/system_network_context_manager.h
  81. 0 1
      shell/browser/network_hints_handler_impl.cc
  82. 0 1
      shell/browser/notifications/win/notification_presenter_win.cc
  83. 3 2
      shell/browser/osr/osr_host_display_client.h
  84. 2 0
      shell/browser/osr/osr_host_display_client_mac.mm
  85. 1 1
      shell/browser/osr/osr_render_widget_host_view.cc
  86. 13 8
      shell/browser/osr/osr_render_widget_host_view.h
  87. 2 0
      shell/browser/osr/osr_video_consumer.cc
  88. 2 1
      shell/browser/osr/osr_view_proxy.h
  89. 0 1
      shell/browser/printing/print_view_manager_electron.cc
  90. 4 4
      shell/browser/printing/print_view_manager_electron.h
  91. 0 1
      shell/browser/protocol_registry.cc
  92. 0 1
      shell/browser/relauncher.cc
  93. 0 1
      shell/browser/relauncher_win.cc
  94. 1 0
      shell/browser/serial/serial_chooser_context.cc
  95. 3 1
      shell/browser/serial/serial_chooser_context.h
  96. 4 1
      shell/browser/serial/serial_chooser_controller.h
  97. 0 1
      shell/browser/special_storage_policy.cc
  98. 0 2
      shell/browser/ui/autofill_popup.cc
  99. 1 0
      shell/browser/ui/cocoa/electron_menu_controller.mm
  100. 0 1
      shell/browser/ui/devtools_manager_delegate.cc

+ 0 - 2
shell/app/electron_content_client.cc

@@ -13,13 +13,11 @@
 #include "base/files/file_util.h"
 #include "base/strings/string_split.h"
 #include "content/public/common/content_constants.h"
-#include "content/public/common/content_switches.h"
 #include "electron/buildflags/buildflags.h"
 #include "electron/fuses.h"
 #include "extensions/common/constants.h"
 #include "pdf/buildflags.h"
 #include "ppapi/buildflags/buildflags.h"
-#include "shell/common/electron_paths.h"
 #include "shell/common/options_switches.h"
 #include "shell/common/process_util.h"
 #include "third_party/widevine/cdm/buildflags.h"

+ 0 - 1
shell/app/electron_crash_reporter_client.cc

@@ -13,7 +13,6 @@
 #include "base/path_service.h"
 #include "base/strings/utf_string_conversions.h"
 #include "build/build_config.h"
-#include "chrome/common/chrome_paths.h"
 #include "components/crash/core/common/crash_keys.h"
 #include "components/upload_list/crash_upload_list.h"
 #include "content/public/common/content_switches.h"

+ 4 - 1
shell/app/electron_main_delegate.h

@@ -9,7 +9,10 @@
 #include <string>
 
 #include "content/public/app/content_main_delegate.h"
-#include "content/public/common/content_client.h"
+
+namespace content {
+class Client;
+}
 
 namespace tracing {
 class TracingSamplerProfiler;

+ 1 - 1
shell/app/electron_main_win.cc

@@ -17,12 +17,12 @@
 #include <vector>
 
 #include "base/at_exit.h"
+#include "base/debug/alias.h"
 #include "base/i18n/icu_util.h"
 #include "base/memory/raw_ptr_exclusion.h"
 #include "base/process/launch.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/win/dark_mode_support.h"
-#include "base/win/windows_version.h"
 #include "chrome/app/exit_code_watcher_win.h"
 #include "components/crash/core/app/crash_switches.h"
 #include "components/crash/core/app/run_as_crashpad_handler_win.h"

+ 0 - 1
shell/app/uv_task_runner.h

@@ -7,7 +7,6 @@
 
 #include <map>
 
-#include "base/functional/callback.h"
 #include "base/memory/raw_ptr.h"
 #include "base/task/single_thread_task_runner.h"
 #include "uv.h"  // NOLINT(build/include_directory)

+ 2 - 5
shell/browser/api/electron_api_app.cc

@@ -38,7 +38,6 @@
 #include "content/public/browser/gpu_data_manager.h"
 #include "content/public/browser/network_service_instance.h"
 #include "content/public/browser/render_frame_host.h"
-#include "content/public/common/content_switches.h"
 #include "crypto/crypto_buildflags.h"
 #include "media/audio/audio_manager.h"
 #include "net/dns/public/dns_over_https_config.h"
@@ -51,15 +50,14 @@
 #include "services/network/network_service.h"
 #include "shell/app/command_line_args.h"
 #include "shell/browser/api/electron_api_menu.h"
-#include "shell/browser/api/electron_api_session.h"
 #include "shell/browser/api/electron_api_utility_process.h"
 #include "shell/browser/api/electron_api_web_contents.h"
 #include "shell/browser/api/gpuinfo_manager.h"
+#include "shell/browser/api/process_metric.h"
 #include "shell/browser/browser_process_impl.h"
-#include "shell/browser/electron_browser_context.h"
 #include "shell/browser/electron_browser_main_parts.h"
 #include "shell/browser/javascript_environment.h"
-#include "shell/browser/login_handler.h"
+#include "shell/browser/net/resolve_proxy_helper.h"
 #include "shell/browser/relauncher.h"
 #include "shell/common/application_info.h"
 #include "shell/common/electron_command_line.h"
@@ -78,7 +76,6 @@
 #include "shell/common/language_util.h"
 #include "shell/common/node_includes.h"
 #include "shell/common/options_switches.h"
-#include "shell/common/platform_util.h"
 #include "shell/common/thread_restrictions.h"
 #include "shell/common/v8_value_serializer.h"
 #include "ui/gfx/image/image.h"

+ 6 - 2
shell/browser/api/electron_api_app.h

@@ -12,7 +12,6 @@
 
 #include "base/containers/flat_map.h"
 #include "base/task/cancelable_task_tracker.h"
-#include "chrome/browser/icon_manager.h"
 #include "chrome/browser/process_singleton.h"
 #include "content/public/browser/browser_child_process_observer.h"
 #include "content/public/browser/gpu_data_manager_observer.h"
@@ -22,7 +21,6 @@
 #include "net/base/completion_once_callback.h"
 #include "net/base/completion_repeating_callback.h"
 #include "net/ssl/client_cert_identity.h"
-#include "shell/browser/api/process_metric.h"
 #include "shell/browser/browser.h"
 #include "shell/browser/browser_observer.h"
 #include "shell/browser/electron_browser_client.h"
@@ -39,8 +37,14 @@ namespace base {
 class FilePath;
 }
 
+namespace gfx {
+class Image;
+}
+
 namespace electron {
 
+struct ProcessMetric;
+
 #if BUILDFLAG(IS_WIN)
 enum class JumpListResult : int;
 #endif

+ 2 - 1
shell/browser/api/electron_api_app_mac.mm

@@ -2,10 +2,11 @@
 // Use of this source code is governed by the MIT license that can be
 // found in the LICENSE file.
 
+#include "shell/browser/api/electron_api_app.h"
+
 #include <string>
 
 #include "base/path_service.h"
-#include "shell/browser/api/electron_api_app.h"
 #include "shell/common/electron_paths.h"
 #include "shell/common/node_includes.h"
 #include "shell/common/process_util.h"

+ 0 - 6
shell/browser/api/electron_api_browser_window.cc

@@ -4,8 +4,6 @@
 
 #include "shell/browser/api/electron_api_browser_window.h"
 
-#include "base/task/single_thread_task_runner.h"
-#include "content/browser/renderer_host/render_widget_host_impl.h"  // nogncheck
 #include "content/browser/renderer_host/render_widget_host_owner_delegate.h"  // nogncheck
 #include "content/browser/web_contents/web_contents_impl.h"  // nogncheck
 #include "content/public/browser/render_process_host.h"
@@ -22,10 +20,6 @@
 #include "shell/common/options_switches.h"
 #include "ui/gl/gpu_switching_manager.h"
 
-#if defined(TOOLKIT_VIEWS)
-#include "shell/browser/native_window_views.h"
-#endif
-
 namespace electron::api {
 
 BrowserWindow::BrowserWindow(gin::Arguments* args,

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

@@ -18,7 +18,6 @@
 #include "chrome/common/chrome_paths.h"
 #include "components/upload_list/crash_upload_list.h"
 #include "components/upload_list/text_log_upload_list.h"
-#include "content/public/common/content_switches.h"
 #include "gin/arguments.h"
 #include "gin/data_object_builder.h"
 #include "shell/common/electron_paths.h"

+ 2 - 1
shell/browser/api/electron_api_crash_reporter.h

@@ -7,7 +7,8 @@
 
 #include <map>
 #include <string>
-#include "base/files/file_path.h"
+
+#include "build/build_config.h"
 
 namespace electron::api::crash_reporter {
 

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

@@ -7,7 +7,6 @@
 
 #include <map>
 
-#include "base/functional/callback.h"
 #include "base/memory/raw_ptr.h"
 #include "base/values.h"
 #include "content/public/browser/devtools_agent_host_client.h"

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

@@ -5,7 +5,6 @@
 #include "shell/browser/api/electron_api_event_emitter.h"
 
 #include "base/functional/bind.h"
-#include "base/functional/callback.h"
 #include "base/no_destructor.h"
 #include "gin/dictionary.h"
 #include "shell/common/gin_converters/callback_converter.h"

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

@@ -8,7 +8,6 @@
 #include <memory>
 #include <string>
 
-#include "base/functional/callback.h"
 #include "base/memory/raw_ptr.h"
 #include "shell/browser/api/electron_api_base_window.h"
 #include "shell/browser/event_emitter_mixin.h"

+ 0 - 1
shell/browser/api/electron_api_menu_mac.mm

@@ -12,7 +12,6 @@
 #include "base/task/current_thread.h"
 #include "base/task/sequenced_task_runner.h"
 #include "content/public/browser/browser_task_traits.h"
-#include "content/public/browser/web_contents.h"
 #include "shell/browser/native_window.h"
 #include "shell/common/keyboard_util.h"
 #include "shell/common/node_includes.h"

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

@@ -8,7 +8,6 @@
 #include <optional>
 
 #include "base/files/file_path.h"
-#include "base/functional/callback.h"
 #include "base/memory/raw_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/values.h"

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

@@ -11,7 +11,6 @@
 #include "base/win/wrapped_window_proc.h"
 #include "content/public/browser/browser_task_traits.h"
 #include "content/public/browser/browser_thread.h"
-#include "ui/base/win/shell.h"
 #include "ui/gfx/win/hwnd_util.h"
 
 namespace electron {

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

@@ -13,7 +13,6 @@
 #include "shell/common/gin_converters/callback_converter.h"
 #include "shell/common/gin_helper/dictionary.h"
 #include "shell/common/node_includes.h"
-#include "shell/common/platform_util.h"
 
 namespace electron::safestorage {
 

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

@@ -16,7 +16,6 @@
 #include "base/win/windows_types.h"
 #include "base/win/wrapped_window_proc.h"
 #include "shell/common/color_util.h"
-#include "ui/base/win/shell.h"
 #include "ui/gfx/color_utils.h"
 #include "ui/gfx/win/hwnd_util.h"
 

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

@@ -13,7 +13,6 @@
 #include "gin/handle.h"
 #include "gin/wrappable.h"
 #include "shell/browser/event_emitter_mixin.h"
-#include "shell/browser/javascript_environment.h"
 #include "shell/browser/ui/tray_icon.h"
 #include "shell/browser/ui/tray_icon_observer.h"
 #include "shell/common/gin_converters/guid_converter.h"

+ 3 - 8
shell/browser/api/electron_api_web_contents.cc

@@ -5,6 +5,7 @@
 #include "shell/browser/api/electron_api_web_contents.h"
 
 #include <limits>
+#include <list>
 #include <memory>
 #include <optional>
 #include <set>
@@ -86,7 +87,6 @@
 #include "shell/browser/browser.h"
 #include "shell/browser/child_web_contents_tracker.h"
 #include "shell/browser/electron_autofill_driver_factory.h"
-#include "shell/browser/electron_browser_client.h"
 #include "shell/browser/electron_browser_context.h"
 #include "shell/browser/electron_browser_main_parts.h"
 #include "shell/browser/electron_navigation_throttle.h"
@@ -142,13 +142,7 @@
 #include "ui/display/screen.h"
 #include "ui/events/base_event_utils.h"
 
-#if BUILDFLAG(IS_WIN)
-#include "shell/browser/native_window_views.h"
-#endif
-
-#if !BUILDFLAG(IS_MAC)
-#include "ui/aura/window.h"
-#else
+#if BUILDFLAG(IS_MAC)
 #include "ui/base/cocoa/defaults_utils.h"
 #endif
 
@@ -157,6 +151,7 @@
 #endif
 
 #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
+#include "ui/aura/window.h"
 #include "ui/gfx/font_render_params.h"
 #endif
 

+ 4 - 1
shell/browser/api/electron_api_web_contents.h

@@ -50,7 +50,6 @@
 #include "shell/common/gin_helper/constructible.h"
 #include "shell/common/gin_helper/error_thrower.h"
 #include "shell/common/gin_helper/pinnable.h"
-#include "ui/base/cursor/cursor.h"
 #include "ui/base/models/image_model.h"
 
 #if BUILDFLAG(ENABLE_PRINTING)
@@ -83,6 +82,10 @@ namespace gin {
 class Arguments;
 }
 
+namespace ui {
+class Cursor;
+}
+
 class SkRegion;
 
 namespace electron {

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

@@ -7,7 +7,6 @@
 #include <utility>
 
 #include "base/files/file_path.h"
-#include "base/functional/callback.h"
 #include "content/public/browser/web_contents.h"
 #include "shell/browser/electron_browser_context.h"
 

+ 1 - 0
shell/browser/auto_updater.cc

@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 
 #include "shell/browser/auto_updater.h"
+#include "build/build_config.h"
 
 namespace auto_updater {
 

+ 0 - 2
shell/browser/auto_updater.h

@@ -8,8 +8,6 @@
 #include <map>
 #include <string>
 
-#include "build/build_config.h"
-
 namespace base {
 class Time;
 }

+ 0 - 1
shell/browser/badging/badge_manager.cc

@@ -8,7 +8,6 @@
 
 #include "base/i18n/number_formatting.h"
 #include "base/strings/utf_string_conversions.h"
-#include "build/build_config.h"
 #include "content/public/browser/browser_task_traits.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/render_frame_host.h"

+ 0 - 1
shell/browser/bluetooth/electron_bluetooth_delegate.cc

@@ -9,7 +9,6 @@
 
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
-#include "build/build_config.h"
 #include "content/public/browser/render_frame_host.h"
 #include "content/public/browser/web_contents.h"
 #include "device/bluetooth/bluetooth_device.h"

+ 1 - 1
shell/browser/bluetooth/electron_bluetooth_delegate.h

@@ -11,8 +11,8 @@
 #include <vector>
 
 #include "base/memory/weak_ptr.h"
+#include "base/values.h"
 #include "content/public/browser/bluetooth_delegate.h"
-#include "content/public/browser/render_frame_host.h"
 #include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom-forward.h"
 
 namespace blink {

+ 0 - 2
shell/browser/browser.cc

@@ -16,11 +16,9 @@
 #include "chrome/common/chrome_paths.h"
 #include "shell/browser/browser_observer.h"
 #include "shell/browser/electron_browser_main_parts.h"
-#include "shell/browser/login_handler.h"
 #include "shell/browser/native_window.h"
 #include "shell/browser/window_list.h"
 #include "shell/common/application_info.h"
-#include "shell/common/electron_paths.h"
 #include "shell/common/gin_converters/login_item_settings_converter.h"
 #include "shell/common/gin_helper/arguments.h"
 #include "shell/common/thread_restrictions.h"

+ 5 - 2
shell/browser/browser.h

@@ -10,6 +10,7 @@
 #include <string>
 #include <vector>
 
+#include "base/files/file_path.h"
 #include "base/observer_list.h"
 #include "base/task/cancelable_task_tracker.h"
 #include "base/values.h"
@@ -27,8 +28,10 @@
 #include "ui/base/cocoa/secure_password_input.h"
 #endif
 
-namespace base {
-class FilePath;
+class GURL;
+
+namespace gin {
+class Arguments;
 }
 
 namespace gin_helper {

+ 1 - 1
shell/browser/browser_observer.h

@@ -9,8 +9,8 @@
 
 #include "base/memory/scoped_refptr.h"
 #include "base/observer_list_types.h"
+#include "base/values.h"
 #include "build/build_config.h"
-#include "shell/browser/login_handler.h"
 
 namespace electron {
 

+ 0 - 2
shell/browser/browser_process_impl.cc

@@ -12,7 +12,6 @@
 #include "base/files/file_path.h"
 #include "base/path_service.h"
 #include "chrome/browser/browser_process.h"
-#include "chrome/common/chrome_paths.h"
 #include "chrome/common/chrome_switches.h"
 #include "components/os_crypt/async/browser/key_provider.h"
 #include "components/os_crypt/async/browser/os_crypt_async.h"
@@ -30,7 +29,6 @@
 #include "content/public/browser/network_quality_observer_factory.h"
 #include "content/public/browser/network_service_instance.h"
 #include "content/public/common/content_switches.h"
-#include "electron/fuses.h"
 #include "extensions/common/constants.h"
 #include "net/proxy_resolution/proxy_config.h"
 #include "net/proxy_resolution/proxy_config_service.h"

+ 1 - 1
shell/browser/browser_win.cc

@@ -15,6 +15,7 @@
 #include <shobjidl.h>  // NOLINT(build/include_order)
 
 #include "base/base_paths.h"
+#include "base/command_line.h"
 #include "base/file_version_info.h"
 #include "base/files/file_path.h"
 #include "base/logging.h"
@@ -27,7 +28,6 @@
 #include "base/win/windows_version.h"
 #include "chrome/browser/icon_manager.h"
 #include "electron/electron_version.h"
-#include "shell/browser/api/electron_api_app.h"
 #include "shell/browser/badging/badge_manager.h"
 #include "shell/browser/electron_browser_main_parts.h"
 #include "shell/browser/javascript_environment.h"

+ 0 - 1
shell/browser/electron_autofill_driver_factory.cc

@@ -8,7 +8,6 @@
 #include <utility>
 
 #include "base/functional/bind.h"
-#include "base/functional/callback.h"
 #include "content/public/browser/navigation_handle.h"
 #include "content/public/browser/render_frame_host.h"
 #include "content/public/browser/web_contents.h"

+ 2 - 1
shell/browser/electron_browser_client.cc

@@ -18,6 +18,7 @@
 #include "base/files/file_util.h"
 #include "base/no_destructor.h"
 #include "base/path_service.h"
+#include "base/process/process_metrics.h"
 #include "base/strings/escape.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
@@ -73,7 +74,6 @@
 #include "shell/browser/api/electron_api_app.h"
 #include "shell/browser/api/electron_api_crash_reporter.h"
 #include "shell/browser/api/electron_api_protocol.h"
-#include "shell/browser/api/electron_api_session.h"
 #include "shell/browser/api/electron_api_web_contents.h"
 #include "shell/browser/api/electron_api_web_request.h"
 #include "shell/browser/badging/badge_manager.h"
@@ -87,6 +87,7 @@
 #include "shell/browser/electron_web_contents_utility_handler_impl.h"
 #include "shell/browser/font_defaults.h"
 #include "shell/browser/javascript_environment.h"
+#include "shell/browser/login_handler.h"
 #include "shell/browser/media/media_capture_devices_dispatcher.h"
 #include "shell/browser/native_window.h"
 #include "shell/browser/net/network_context_service.h"

+ 1 - 0
shell/browser/electron_browser_client.h

@@ -30,6 +30,7 @@
 
 namespace content {
 class ClientCertificateDelegate;
+class PlatformNotificationService;
 class QuotaPermissionContext;
 }  // namespace content
 

+ 2 - 4
shell/browser/electron_browser_main_parts.cc

@@ -22,7 +22,6 @@
 #include "base/task/single_thread_task_runner.h"
 #include "chrome/browser/icon_manager.h"
 #include "chrome/browser/ui/color/chrome_color_mixers.h"
-#include "chrome/common/chrome_paths.h"
 #include "chrome/common/chrome_switches.h"
 #include "components/os_crypt/sync/key_storage_config_linux.h"
 #include "components/os_crypt/sync/key_storage_util_linux.h"
@@ -35,6 +34,7 @@
 #include "content/public/browser/child_process_data.h"
 #include "content/public/browser/child_process_security_policy.h"
 #include "content/public/browser/device_service.h"
+#include "content/public/browser/download_manager.h"
 #include "content/public/browser/first_party_sets_handler.h"
 #include "content/public/browser/web_ui_controller_factory.h"
 #include "content/public/common/content_features.h"
@@ -42,12 +42,10 @@
 #include "content/public/common/process_type.h"
 #include "content/public/common/result_codes.h"
 #include "electron/buildflags/buildflags.h"
-#include "electron/fuses.h"
 #include "media/base/localized_strings.h"
 #include "services/network/public/cpp/features.h"
 #include "services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.h"
 #include "shell/app/electron_main_delegate.h"
-#include "shell/browser/api/electron_api_app.h"
 #include "shell/browser/api/electron_api_utility_process.h"
 #include "shell/browser/browser.h"
 #include "shell/browser/browser_process_impl.h"
@@ -69,9 +67,9 @@
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/base/ui_base_switches.h"
 #include "ui/color/color_provider_manager.h"
+#include "url/url_util.h"
 
 #if defined(USE_AURA)
-#include "ui/display/display.h"
 #include "ui/display/screen.h"
 #include "ui/views/widget/desktop_aura/desktop_screen.h"
 #include "ui/wm/core/wm_state.h"

+ 0 - 1
shell/browser/electron_browser_main_parts_mac.mm

@@ -13,7 +13,6 @@
 #include "shell/browser/browser_process_impl.h"
 #include "shell/browser/mac/electron_application.h"
 #include "shell/browser/mac/electron_application_delegate.h"
-#include "shell/common/electron_paths.h"
 #include "ui/base/l10n/l10n_util_mac.h"
 
 namespace electron {

+ 1 - 1
shell/browser/electron_permission_manager.cc

@@ -19,7 +19,7 @@
 #include "content/public/browser/web_contents.h"
 #include "gin/data_object_builder.h"
 #include "shell/browser/api/electron_api_web_contents.h"
-#include "shell/browser/electron_browser_client.h"
+#include "shell/browser/electron_browser_context.h"
 #include "shell/browser/electron_browser_main_parts.h"
 #include "shell/browser/web_contents_permission_helper.h"
 #include "shell/browser/web_contents_preferences.h"

+ 3 - 5
shell/browser/electron_permission_manager.h

@@ -10,20 +10,18 @@
 
 #include "base/containers/id_map.h"
 #include "base/functional/callback.h"
+#include "base/values.h"
 #include "content/public/browser/permission_controller_delegate.h"
-#include "shell/browser/electron_browser_context.h"
 #include "shell/common/gin_helper/dictionary.h"
 
-namespace base {
-class Value;
-}  // namespace base
-
 namespace content {
 class WebContents;
 }
 
 namespace electron {
 
+class ElectronBrowserContext;
+
 class ElectronPermissionManager : public content::PermissionControllerDelegate {
  public:
   ElectronPermissionManager();

+ 0 - 1
shell/browser/extensions/api/management/electron_management_api_delegate.h

@@ -8,7 +8,6 @@
 #include <memory>
 #include <string>
 
-#include "base/task/cancelable_task_tracker.h"
 #include "extensions/browser/api/management/management_api_delegate.h"
 #include "extensions/common/extension_id.h"
 

+ 0 - 1
shell/browser/extensions/api/pdf_viewer_private/pdf_viewer_private_api.cc

@@ -16,7 +16,6 @@
 #include "components/pdf/common/constants.h"
 #include "components/prefs/pref_service.h"
 #include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h"
-#include "shell/browser/electron_browser_context.h"
 #include "url/url_constants.h"
 
 namespace extensions {

+ 0 - 1
shell/browser/extensions/api/runtime/electron_runtime_api_delegate.cc

@@ -6,7 +6,6 @@
 
 #include <string>
 
-#include "build/build_config.h"
 #include "components/update_client/update_query_params.h"
 #include "extensions/common/api/runtime.h"
 #include "shell/browser/extensions/electron_extension_system.h"

+ 0 - 1
shell/browser/extensions/api/streams_private/streams_private_api.cc

@@ -8,7 +8,6 @@
 #include <utility>
 
 #include "content/public/browser/browser_thread.h"
-#include "content/public/browser/render_frame_host.h"
 #include "content/public/browser/web_contents.h"
 #include "electron/buildflags/buildflags.h"
 #include "extensions/browser/extension_registry.h"

+ 3 - 1
shell/browser/extensions/api/tabs/tabs_api.cc

@@ -4,8 +4,10 @@
 
 #include "shell/browser/extensions/api/tabs/tabs_api.h"
 
-#include <memory>
+#include <optional>
+#include <string>
 #include <utility>
+#include <vector>
 
 #include "base/command_line.h"
 #include "base/strings/pattern.h"

+ 0 - 1
shell/browser/extensions/electron_component_extension_resource_manager.cc

@@ -10,7 +10,6 @@
 #include "base/containers/contains.h"
 #include "base/path_service.h"
 #include "base/values.h"
-#include "build/build_config.h"
 #include "chrome/common/chrome_paths.h"
 #include "chrome/grit/component_extension_resources_map.h"
 #include "electron/buildflags/buildflags.h"

+ 0 - 2
shell/browser/extensions/electron_extensions_browser_client.cc

@@ -10,7 +10,6 @@
 #include "base/functional/bind.h"
 #include "base/memory/ptr_util.h"
 #include "base/path_service.h"
-#include "build/build_config.h"
 #include "chrome/browser/extensions/chrome_url_request_util.h"
 #include "chrome/common/chrome_paths.h"
 #include "chrome/common/extensions/chrome_manifest_url_handlers.h"
@@ -33,7 +32,6 @@
 #include "extensions/common/file_util.h"
 #include "extensions/common/manifest_constants.h"
 #include "extensions/common/manifest_url_handlers.h"
-#include "net/base/mime_util.h"
 #include "services/network/public/mojom/url_loader.mojom.h"
 #include "shell/browser/browser.h"
 #include "shell/browser/electron_browser_client.h"

+ 0 - 1
shell/browser/extensions/electron_extensions_browser_client.h

@@ -9,7 +9,6 @@
 #include <string>
 #include <vector>
 
-#include "build/build_config.h"
 #include "extensions/browser/extensions_browser_client.h"
 #include "extensions/browser/kiosk/kiosk_delegate.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"

+ 0 - 1
shell/browser/extensions/electron_messaging_delegate.cc

@@ -9,7 +9,6 @@
 
 #include "base/functional/callback.h"
 #include "base/values.h"
-#include "build/build_config.h"
 #include "components/prefs/pref_service.h"
 #include "content/public/browser/browser_context.h"
 #include "content/public/browser/browser_thread.h"

+ 0 - 1
shell/browser/extensions/electron_process_manager_delegate.cc

@@ -7,7 +7,6 @@
 
 #include "base/command_line.h"
 #include "base/one_shot_event.h"
-#include "build/build_config.h"
 #include "content/public/browser/notification_service.h"
 #include "extensions/browser/extension_system.h"
 #include "extensions/browser/process_manager.h"

+ 0 - 1
shell/browser/fake_location_provider.cc

@@ -4,7 +4,6 @@
 
 #include "shell/browser/fake_location_provider.h"
 
-#include "base/functional/callback.h"
 #include "base/time/time.h"
 #include "services/device/public/mojom/geoposition.mojom-shared.h"
 #include "services/device/public/mojom/geoposition.mojom.h"

+ 0 - 1
shell/browser/file_select_helper.cc

@@ -19,7 +19,6 @@
 #include "base/threading/hang_watcher.h"
 #include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
-#include "chrome/browser/platform_util.h"
 #include "chrome/common/pref_names.h"
 #include "chrome/grit/generated_resources.h"
 #include "components/prefs/pref_service.h"

+ 0 - 2
shell/browser/file_select_helper.h

@@ -12,8 +12,6 @@
 #include "base/memory/raw_ptr.h"
 #include "build/build_config.h"
 #include "content/public/browser/browser_thread.h"
-#include "content/public/browser/render_widget_host.h"
-#include "content/public/browser/render_widget_host_observer.h"
 #include "content/public/browser/web_contents_observer.h"
 #include "net/base/directory_lister.h"
 #include "third_party/blink/public/mojom/choosers/file_chooser.mojom.h"

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

@@ -13,6 +13,7 @@
 #include "content/public/browser/web_contents.h"
 #include "electron/buildflags/buildflags.h"
 #include "services/device/public/cpp/hid/hid_switches.h"
+#include "shell/browser/electron_browser_context.h"
 #include "shell/browser/electron_permission_manager.h"
 #include "shell/browser/hid/hid_chooser_context.h"
 #include "shell/browser/hid/hid_chooser_context_factory.h"

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

@@ -14,7 +14,6 @@
 #include "content/public/browser/hid_chooser.h"
 #include "content/public/browser/hid_delegate.h"
 #include "services/device/public/mojom/hid.mojom-forward.h"
-#include "shell/browser/hid/hid_chooser_context.h"
 #include "third_party/blink/public/mojom/hid/hid.mojom-forward.h"
 #include "url/origin.h"
 

+ 2 - 4
shell/browser/hid/hid_chooser_context.cc

@@ -4,11 +4,8 @@
 
 #include "shell/browser/hid/hid_chooser_context.h"
 
-#include <utility>
-
-#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
 #include <string_view>
-#endif  // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
+#include <utility>
 
 #include "base/command_line.h"
 #include "base/containers/contains.h"
@@ -23,6 +20,7 @@
 #include "services/device/public/cpp/hid/hid_blocklist.h"
 #include "services/device/public/cpp/hid/hid_switches.h"
 #include "shell/browser/api/electron_api_session.h"
+#include "shell/browser/electron_browser_context.h"
 #include "shell/browser/electron_permission_manager.h"
 #include "shell/browser/web_contents_permission_helper.h"
 #include "shell/common/electron_constants.h"

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

@@ -17,12 +17,10 @@
 #include "base/scoped_observation_traits.h"
 #include "base/unguessable_token.h"
 #include "components/keyed_service/core/keyed_service.h"
-#include "content/public/browser/web_contents.h"
 #include "mojo/public/cpp/bindings/associated_receiver.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
 #include "mojo/public/cpp/bindings/remote.h"
 #include "services/device/public/mojom/hid.mojom.h"
-#include "shell/browser/electron_browser_context.h"
 #include "url/origin.h"
 
 namespace base {
@@ -31,6 +29,8 @@ class Value;
 
 namespace electron {
 
+class ElectronBrowserContext;
+
 extern const char kHidDeviceNameKey[];
 extern const char kHidGuidKey[];
 extern const char kHidProductIdKey[];

+ 7 - 1
shell/browser/hid/hid_chooser_controller.h

@@ -17,7 +17,6 @@
 #include "content/public/browser/web_contents.h"
 #include "content/public/browser/web_contents_observer.h"
 #include "services/device/public/mojom/hid.mojom-forward.h"
-#include "shell/browser/api/electron_api_session.h"
 #include "shell/browser/hid/electron_hid_delegate.h"
 #include "shell/browser/hid/hid_chooser_context.h"
 #include "shell/common/gin_converters/frame_converter.h"
@@ -28,7 +27,14 @@ namespace content {
 class RenderFrameHost;
 }  // namespace content
 
+namespace gin {
+class Arguments;
+}
+
 namespace electron {
+namespace api {
+class Session;
+}
 
 class ElectronHidDelegate;
 

+ 0 - 2
shell/browser/linux/unity_service.cc

@@ -9,8 +9,6 @@
 
 #include <string>
 
-#include "base/nix/xdg_util.h"
-
 // Unity data typedefs.
 typedef struct _UnityInspector UnityInspector;
 typedef UnityInspector* (*unity_inspector_get_default_func)();

+ 0 - 1
shell/browser/login_handler.cc

@@ -6,7 +6,6 @@
 
 #include <utility>
 
-#include "base/functional/callback.h"
 #include "base/task/sequenced_task_runner.h"
 #include "gin/arguments.h"
 #include "gin/dictionary.h"

+ 1 - 1
shell/browser/mac/electron_application_delegate.mm

@@ -4,11 +4,11 @@
 
 #import "shell/browser/mac/electron_application_delegate.h"
 
-#include <memory>
 #include <string>
 
 #include "base/allocator/buildflags.h"
 #include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.h"
+#include "base/functional/callback.h"
 #include "base/mac/mac_util.h"
 #include "base/strings/sys_string_conversions.h"
 #include "shell/browser/api/electron_api_push_notifications.h"

+ 0 - 1
shell/browser/mac/in_app_purchase_observer.h

@@ -9,7 +9,6 @@
 #include <string>
 #include <vector>
 
-#include "base/functional/callback.h"
 #include "base/memory/raw_ptr_exclusion.h"
 #include "base/memory/weak_ptr.h"
 

+ 0 - 1
shell/browser/media/media_capture_devices_dispatcher.h

@@ -7,7 +7,6 @@
 
 #include "components/webrtc/media_stream_device_enumerator_impl.h"
 #include "content/public/browser/media_observer.h"
-#include "content/public/browser/media_stream_request.h"
 #include "third_party/blink/public/common/mediastream/media_stream_request.h"
 #include "third_party/blink/public/mojom/mediastream/media_stream.mojom.h"
 

+ 1 - 2
shell/browser/native_window.cc

@@ -16,6 +16,7 @@
 #include "include/core/SkColor.h"
 #include "shell/browser/background_throttling_source.h"
 #include "shell/browser/browser.h"
+#include "shell/browser/draggable_region_provider.h"
 #include "shell/browser/native_window_features.h"
 #include "shell/browser/ui/drag_util.h"
 #include "shell/browser/window_list.h"
@@ -23,7 +24,6 @@
 #include "shell/common/gin_helper/dictionary.h"
 #include "shell/common/gin_helper/persistent_dictionary.h"
 #include "shell/common/options_switches.h"
-#include "third_party/skia/include/core/SkRegion.h"
 #include "ui/base/hit_test.h"
 #include "ui/compositor/compositor.h"
 #include "ui/views/widget/widget.h"
@@ -33,7 +33,6 @@
 #endif
 
 #if BUILDFLAG(IS_WIN)
-#include "ui/base/win/shell.h"
 #include "ui/display/win/screen_win.h"
 #endif
 

+ 1 - 2
shell/browser/native_window.h

@@ -20,12 +20,11 @@
 #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/draggable_region_provider.h"
 #include "shell/browser/native_window_observer.h"
-#include "shell/browser/ui/inspectable_web_contents_view.h"
 #include "ui/views/widget/widget_delegate.h"
 
 class SkRegion;
+class DraggableRegionProvider;
 
 namespace input {
 struct NativeWebKeyboardEvent;

+ 1 - 0
shell/browser/native_window_mac.h

@@ -14,6 +14,7 @@
 
 #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"
 #include "ui/native_theme/native_theme_observer.h"
 #include "ui/views/controls/native/native_view_host.h"

+ 0 - 1
shell/browser/native_window_mac.mm

@@ -40,7 +40,6 @@
 #include "shell/common/node_includes.h"
 #include "shell/common/options_switches.h"
 #include "skia/ext/skia_utils_mac.h"
-#include "third_party/skia/include/core/SkRegion.h"
 #include "third_party/webrtc/modules/desktop_capture/mac/window_list_utils.h"
 #include "ui/base/hit_test.h"
 #include "ui/display/screen.h"

+ 0 - 3
shell/browser/native_window_views.cc

@@ -27,7 +27,6 @@
 #include "content/public/common/color_parser.h"
 #include "shell/browser/api/electron_api_web_contents.h"
 #include "shell/browser/ui/inspectable_web_contents.h"
-#include "shell/browser/ui/inspectable_web_contents_view.h"
 #include "shell/browser/ui/views/root_view.h"
 #include "shell/browser/web_contents_preferences.h"
 #include "shell/browser/web_view_manager.h"
@@ -56,7 +55,6 @@
 #include "shell/browser/linux/unity_service.h"
 #include "shell/browser/ui/electron_desktop_window_tree_host_linux.h"
 #include "shell/browser/ui/views/client_frame_view_linux.h"
-#include "shell/browser/ui/views/frameless_view.h"
 #include "shell/browser/ui/views/native_frame_view.h"
 #include "shell/browser/ui/views/opaque_frame_view.h"
 #include "shell/common/platform_util.h"
@@ -79,7 +77,6 @@
 #include "shell/browser/ui/views/win_frame_view.h"
 #include "shell/browser/ui/win/electron_desktop_native_widget_aura.h"
 #include "skia/ext/skia_utils_win.h"
-#include "ui/base/win/shell.h"
 #include "ui/display/win/screen_win.h"
 #include "ui/gfx/color_utils.h"
 #include "ui/gfx/win/hwnd_util.h"

+ 1 - 2
shell/browser/native_window_views_win.cc

@@ -15,8 +15,7 @@
 #include "shell/browser/ui/views/win_frame_view.h"
 #include "shell/common/electron_constants.h"
 #include "ui/display/display.h"
-#include "ui/display/win/screen_win.h"
-#include "ui/gfx/geometry/insets.h"
+#include "ui/display/screen.h"
 #include "ui/gfx/geometry/resize_utils.h"
 #include "ui/views/widget/native_widget_private.h"
 

+ 0 - 2
shell/browser/net/asar/asar_file_validator.h

@@ -5,9 +5,7 @@
 #ifndef ELECTRON_SHELL_BROWSER_NET_ASAR_ASAR_FILE_VALIDATOR_H_
 #define ELECTRON_SHELL_BROWSER_NET_ASAR_ASAR_FILE_VALIDATOR_H_
 
-#include <algorithm>
 #include <memory>
-#include <optional>
 
 #include "crypto/secure_hash.h"
 #include "mojo/public/cpp/system/file_data_source.h"

+ 0 - 1
shell/browser/net/asar/asar_url_loader.cc

@@ -13,7 +13,6 @@
 #include "base/strings/string_piece.h"
 #include "base/task/thread_pool.h"
 #include "content/public/browser/file_url_loader.h"
-#include "electron/fuses.h"
 #include "mojo/public/cpp/bindings/receiver.h"
 #include "mojo/public/cpp/bindings/remote.h"
 #include "mojo/public/cpp/system/data_pipe_producer.h"

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

@@ -4,7 +4,6 @@
 
 #include "shell/browser/net/electron_url_loader_factory.h"
 
-#include <list>
 #include <memory>
 #include <string>
 #include <string_view>

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

@@ -17,6 +17,7 @@
 #include "services/network/public/cpp/cors/origin_access_list.h"
 #include "shell/browser/browser_process_impl.h"
 #include "shell/browser/electron_browser_client.h"
+#include "shell/browser/electron_browser_context.h"
 #include "shell/browser/net/system_network_context_manager.h"
 
 namespace electron {

+ 6 - 1
shell/browser/net/network_context_service.h

@@ -11,14 +11,19 @@
 #include "mojo/public/cpp/bindings/remote.h"
 #include "services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom.h"
 #include "services/network/public/mojom/network_context.mojom.h"
-#include "shell/browser/electron_browser_context.h"
 
 namespace base {
 class FilePath;
 }  // namespace base
 
+namespace content {
+class BrowserContext;
+}  // namespace content
+
 namespace electron {
 
+class ElectronBrowserContext;
+
 // KeyedService that initializes and provides access to the NetworkContexts for
 // a BrowserContext.
 class NetworkContextService : public KeyedService {

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

@@ -6,6 +6,7 @@
 
 #include "base/no_destructor.h"
 #include "components/keyed_service/content/browser_context_dependency_manager.h"
+#include "shell/browser/electron_browser_context.h"
 #include "shell/browser/net/network_context_service.h"
 
 namespace electron {

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

@@ -20,7 +20,6 @@
 #include "net/http/http_status_code.h"
 #include "net/http/http_util.h"
 #include "net/url_request/redirect_info.h"
-#include "services/metrics/public/cpp/ukm_source_id.h"
 #include "services/network/public/cpp/features.h"
 #include "services/network/public/mojom/early_hints.mojom.h"
 #include "shell/browser/net/asar/asar_url_loader.h"

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

@@ -17,7 +17,6 @@
 #include "base/memory/raw_ref.h"
 #include "base/memory/weak_ptr.h"
 #include "content/public/browser/content_browser_client.h"
-#include "content/public/browser/render_frame_host.h"
 #include "extensions/browser/api/web_request/web_request_info.h"
 #include "mojo/public/cpp/bindings/pending_receiver.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"

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

@@ -12,7 +12,6 @@
 #include "content/public/browser/browser_thread.h"
 #include "extensions/browser/extension_navigation_ui_data.h"
 #include "net/base/ip_endpoint.h"
-#include "net/http/http_util.h"
 #include "services/network/public/mojom/url_response_head.mojom.h"
 
 namespace electron {

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

@@ -15,7 +15,6 @@
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/net/chrome_mojo_proxy_resolver_factory.h"
 #include "chrome/common/chrome_features.h"
-#include "chrome/common/chrome_paths.h"
 #include "chrome/common/chrome_switches.h"
 #include "components/os_crypt/sync/os_crypt.h"
 #include "components/prefs/pref_service.h"
@@ -37,7 +36,6 @@
 #include "shell/browser/browser.h"
 #include "shell/browser/electron_browser_client.h"
 #include "shell/common/application_info.h"
-#include "shell/common/electron_paths.h"
 #include "shell/common/options_switches.h"
 #include "url/gurl.h"
 

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

@@ -5,8 +5,6 @@
 #ifndef ELECTRON_SHELL_BROWSER_NET_SYSTEM_NETWORK_CONTEXT_MANAGER_H_
 #define ELECTRON_SHELL_BROWSER_NET_SYSTEM_NETWORK_CONTEXT_MANAGER_H_
 
-#include <optional>
-
 #include "chrome/browser/net/proxy_config_monitor.h"
 #include "mojo/public/cpp/bindings/remote.h"
 #include "sandbox/policy/features.h"

+ 0 - 1
shell/browser/network_hints_handler_impl.cc

@@ -12,7 +12,6 @@
 #include "content/public/browser/render_process_host.h"
 #include "mojo/public/cpp/bindings/self_owned_receiver.h"
 #include "shell/browser/api/electron_api_session.h"
-#include "shell/browser/electron_browser_context.h"
 #include "shell/common/gin_converters/gurl_converter.h"
 #include "v8/include/v8.h"
 

+ 0 - 1
shell/browser/notifications/win/notification_presenter_win.cc

@@ -17,7 +17,6 @@
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/time/time.h"
-#include "base/win/windows_version.h"
 #include "shell/browser/notifications/win/windows_toast_notification.h"
 #include "shell/common/thread_restrictions.h"
 #include "third_party/skia/include/core/SkBitmap.h"

+ 3 - 2
shell/browser/osr/osr_host_display_client.h

@@ -11,10 +11,11 @@
 #include "base/memory/shared_memory_mapping.h"
 #include "components/viz/host/host_display_client.h"
 #include "services/viz/privileged/mojom/compositing/layered_window_updater.mojom.h"
-#include "third_party/skia/include/core/SkBitmap.h"
-#include "third_party/skia/include/core/SkCanvas.h"
 #include "ui/gfx/native_widget_types.h"
 
+class SkBitmap;
+class SkCanvas;
+
 namespace electron {
 
 typedef base::RepeatingCallback<void(const gfx::Rect&, const SkBitmap&)>

+ 2 - 0
shell/browser/osr/osr_host_display_client_mac.mm

@@ -3,6 +3,8 @@
 // found in the LICENSE file.
 
 #include "shell/browser/osr/osr_host_display_client.h"
+#include "third_party/skia/include/core/SkBitmap.h"
+#include "third_party/skia/include/core/SkImageInfo.h"
 
 #include <IOSurface/IOSurface.h>
 

+ 1 - 1
shell/browser/osr/osr_render_widget_host_view.cc

@@ -32,7 +32,7 @@
 #include "content/public/browser/gpu_data_manager.h"
 #include "content/public/browser/render_process_host.h"
 #include "gpu/command_buffer/client/gl_helper.h"
-#include "media/base/video_frame.h"
+#include "shell/browser/osr/osr_host_display_client.h"
 #include "third_party/blink/public/common/input/web_input_event.h"
 #include "third_party/skia/include/core/SkCanvas.h"
 #include "ui/compositor/compositor.h"

+ 13 - 8
shell/browser/osr/osr_render_widget_host_view.h

@@ -26,17 +26,14 @@
 #include "content/browser/renderer_host/render_widget_host_impl.h"  // nogncheck
 #include "content/browser/renderer_host/render_widget_host_view_base.h"  // nogncheck
 #include "content/browser/web_contents/web_contents_view.h"  // nogncheck
-#include "shell/browser/osr/osr_host_display_client.h"
 #include "shell/browser/osr/osr_video_consumer.h"
 #include "shell/browser/osr/osr_view_proxy.h"
 #include "third_party/blink/public/mojom/widget/record_content_to_visible_time_request.mojom-forward.h"
 #include "third_party/blink/public/platform/web_vector.h"
-#include "third_party/skia/include/core/SkBitmap.h"
 #include "ui/base/ime/text_input_client.h"
 #include "ui/compositor/compositor.h"
 #include "ui/compositor/layer_delegate.h"
 #include "ui/compositor/layer_owner.h"
-#include "ui/gfx/geometry/point.h"
 
 #include "components/viz/host/host_display_client.h"
 
@@ -44,20 +41,28 @@
 #include "ui/gfx/win/window_impl.h"
 #endif
 
+class SkBitmap;
+
+namespace gfx {
+class Point;
+class PointF;
+class Rect;
+}  // namespace gfx
+
 namespace input {
 class CursorManager;
 }
 
 namespace electron {
 
-class ElectronCopyFrameGenerator;
 class ElectronBeginFrameTimer;
-
+class ElectronCopyFrameGenerator;
 class ElectronDelegatedFrameHostClient;
+class OffScreenHostDisplayClient;
 
-typedef base::RepeatingCallback<void(const gfx::Rect&, const SkBitmap&)>
-    OnPaintCallback;
-typedef base::RepeatingCallback<void(const gfx::Rect&)> OnPopupPaintCallback;
+using OnPaintCallback =
+    base::RepeatingCallback<void(const gfx::Rect&, const SkBitmap&)>;
+using OnPopupPaintCallback = base::RepeatingCallback<void(const gfx::Rect&)>;
 
 class OffScreenRenderWidgetHostView
     : public content::RenderWidgetHostViewBase,

+ 2 - 0
shell/browser/osr/osr_video_consumer.cc

@@ -12,6 +12,8 @@
 #include "media/capture/mojom/video_capture_types.mojom.h"
 #include "services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom-shared.h"
 #include "shell/browser/osr/osr_render_widget_host_view.h"
+#include "third_party/skia/include/core/SkImageInfo.h"
+#include "third_party/skia/include/core/SkRegion.h"
 #include "ui/gfx/skbitmap_operations.h"
 
 namespace {

+ 2 - 1
shell/browser/osr/osr_view_proxy.h

@@ -8,11 +8,12 @@
 #include <memory>
 
 #include "base/memory/raw_ptr.h"
-#include "third_party/skia/include/core/SkBitmap.h"
 #include "ui/events/event.h"
 #include "ui/gfx/geometry/rect.h"
 #include "ui/views/view.h"
 
+class SkBitmap;
+
 namespace electron {
 
 class OffscreenViewProxy;

+ 0 - 1
shell/browser/printing/print_view_manager_electron.cc

@@ -8,7 +8,6 @@
 
 #include "base/containers/contains.h"
 #include "base/functional/bind.h"
-#include "build/build_config.h"
 #include "components/printing/browser/print_to_pdf/pdf_print_utils.h"
 #include "printing/mojom/print.mojom.h"
 #include "printing/page_range.h"

+ 4 - 4
shell/browser/printing/print_view_manager_electron.h

@@ -9,14 +9,14 @@
 #include <vector>
 
 #include "base/memory/ref_counted_memory.h"
-#include "build/build_config.h"
 #include "chrome/browser/printing/print_view_manager_base.h"
 #include "components/printing/browser/print_to_pdf/pdf_print_job.h"
 #include "components/printing/common/print.mojom.h"
-#include "content/public/browser/render_frame_host.h"
-#include "content/public/browser/web_contents_observer.h"
 #include "content/public/browser/web_contents_user_data.h"
-#include "printing/print_settings.h"
+
+namespace content {
+class RenderFrameHost;
+}
 
 namespace electron {
 

+ 0 - 1
shell/browser/protocol_registry.cc

@@ -4,7 +4,6 @@
 
 #include "shell/browser/protocol_registry.h"
 
-#include "content/public/browser/web_contents.h"
 #include "electron/fuses.h"
 #include "shell/browser/electron_browser_context.h"
 #include "shell/browser/net/asar/asar_url_loader_factory.h"

+ 0 - 1
shell/browser/relauncher.cc

@@ -16,7 +16,6 @@
 #include "base/path_service.h"
 #include "base/process/launch.h"
 #include "content/public/common/content_paths.h"
-#include "content/public/common/content_switches.h"
 #include "content/public/common/main_function_params.h"
 #include "shell/common/electron_command_line.h"
 

+ 0 - 1
shell/browser/relauncher_win.cc

@@ -14,7 +14,6 @@
 #include "base/win/scoped_handle.h"
 #include "sandbox/win/src/nt_internals.h"
 #include "sandbox/win/src/win_utils.h"
-#include "ui/base/win/shell.h"
 
 namespace relauncher::internal {
 

+ 1 - 0
shell/browser/serial/serial_chooser_context.cc

@@ -15,6 +15,7 @@
 #include "content/public/browser/web_contents.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
 #include "shell/browser/api/electron_api_session.h"
+#include "shell/browser/electron_browser_context.h"
 #include "shell/browser/electron_permission_manager.h"
 #include "shell/browser/web_contents_permission_helper.h"
 #include "shell/common/gin_converters/frame_converter.h"

+ 3 - 1
shell/browser/serial/serial_chooser_context.h

@@ -16,9 +16,9 @@
 #include "components/keyed_service/core/keyed_service.h"
 #include "content/public/browser/serial_delegate.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
+#include "mojo/public/cpp/bindings/receiver.h"
 #include "mojo/public/cpp/bindings/remote.h"
 #include "services/device/public/mojom/serial.mojom-forward.h"
-#include "shell/browser/electron_browser_context.h"
 #include "third_party/blink/public/mojom/serial/serial.mojom.h"
 #include "url/gurl.h"
 #include "url/origin.h"
@@ -29,6 +29,8 @@ class Value;
 
 namespace electron {
 
+class ElectronBrowserContext;
+
 #if BUILDFLAG(IS_WIN)
 extern const char kDeviceInstanceIdKey[];
 #else

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

@@ -14,7 +14,6 @@
 #include "content/public/browser/web_contents.h"
 #include "content/public/browser/web_contents_observer.h"
 #include "services/device/public/mojom/serial.mojom-forward.h"
-#include "shell/browser/api/electron_api_session.h"
 #include "shell/browser/serial/electron_serial_delegate.h"
 #include "shell/browser/serial/serial_chooser_context.h"
 #include "third_party/blink/public/mojom/serial/serial.mojom.h"
@@ -25,6 +24,10 @@ class RenderFrameHost;
 
 namespace electron {
 
+namespace api {
+class Session;
+}
+
 class ElectronSerialDelegate;
 
 // SerialChooserController provides data for the Serial API permission prompt.

+ 0 - 1
shell/browser/special_storage_policy.cc

@@ -5,7 +5,6 @@
 #include "shell/browser/special_storage_policy.h"
 
 #include "base/functional/bind.h"
-#include "base/functional/callback.h"
 #include "services/network/public/cpp/session_cookie_delete_predicate.h"
 
 namespace electron {

+ 0 - 2
shell/browser/ui/autofill_popup.cc

@@ -11,7 +11,6 @@
 #include "components/autofill/core/common/autofill_features.h"
 #include "electron/buildflags/buildflags.h"
 #include "mojo/public/cpp/bindings/associated_remote.h"
-#include "shell/browser/native_window_views.h"
 #include "shell/browser/osr/osr_render_widget_host_view.h"
 #include "shell/browser/osr/osr_view_proxy.h"
 #include "shell/browser/ui/autofill_popup.h"
@@ -19,7 +18,6 @@
 #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
 #include "ui/color/color_id.h"
 #include "ui/color/color_provider.h"
-#include "ui/display/display.h"
 #include "ui/display/screen.h"
 #include "ui/gfx/geometry/point.h"
 #include "ui/gfx/geometry/rect.h"

+ 1 - 0
shell/browser/ui/cocoa/electron_menu_controller.mm

@@ -9,6 +9,7 @@
 #include <utility>
 
 #include "base/apple/foundation_util.h"
+#include "base/functional/callback.h"
 #include "base/logging.h"
 #include "base/strings/sys_string_conversions.h"
 #include "base/strings/utf_string_conversions.h"

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

@@ -12,7 +12,6 @@
 #include "base/functional/bind.h"
 #include "base/path_service.h"
 #include "base/strings/string_number_conversions.h"
-#include "chrome/common/chrome_paths.h"
 #include "content/public/browser/devtools_agent_host.h"
 #include "content/public/browser/devtools_frontend_host.h"
 #include "content/public/browser/devtools_socket_factory.h"

Some files were not shown because too many files changed in this diff