From aa23198ad8ed023a09bf6162f0e268f4aa0aa524 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 25 Jul 2024 04:25:45 -0500 Subject: [PATCH] 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 * chore: iwyu * chore: iwyu * 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 --- shell/app/electron_content_client.cc | 2 -- shell/app/electron_crash_reporter_client.cc | 1 - shell/app/electron_main_delegate.h | 5 ++++- shell/app/electron_main_win.cc | 2 +- shell/app/uv_task_runner.h | 1 - shell/browser/api/electron_api_app.cc | 7 ++----- shell/browser/api/electron_api_app.h | 8 +++++-- shell/browser/api/electron_api_app_mac.mm | 3 ++- .../api/electron_api_browser_window.cc | 6 ------ .../api/electron_api_crash_reporter.cc | 1 - .../browser/api/electron_api_crash_reporter.h | 3 ++- shell/browser/api/electron_api_debugger.h | 1 - .../browser/api/electron_api_event_emitter.cc | 1 - shell/browser/api/electron_api_menu.h | 1 - shell/browser/api/electron_api_menu_mac.mm | 1 - shell/browser/api/electron_api_net_log.h | 1 - .../api/electron_api_power_monitor_win.cc | 1 - .../browser/api/electron_api_safe_storage.cc | 1 - .../electron_api_system_preferences_win.cc | 1 - shell/browser/api/electron_api_tray.h | 1 - .../browser/api/electron_api_web_contents.cc | 11 +++------- shell/browser/api/electron_api_web_contents.h | 5 ++++- shell/browser/api/save_page_handler.cc | 1 - shell/browser/auto_updater.cc | 1 + shell/browser/auto_updater.h | 2 -- shell/browser/badging/badge_manager.cc | 1 - .../bluetooth/electron_bluetooth_delegate.cc | 1 - .../bluetooth/electron_bluetooth_delegate.h | 2 +- shell/browser/browser.cc | 2 -- shell/browser/browser.h | 7 +++++-- shell/browser/browser_observer.h | 2 +- shell/browser/browser_process_impl.cc | 2 -- shell/browser/browser_win.cc | 2 +- .../electron_autofill_driver_factory.cc | 1 - shell/browser/electron_browser_client.cc | 3 ++- shell/browser/electron_browser_client.h | 1 + shell/browser/electron_browser_main_parts.cc | 6 ++---- .../electron_browser_main_parts_mac.mm | 1 - shell/browser/electron_permission_manager.cc | 2 +- shell/browser/electron_permission_manager.h | 8 +++---- .../electron_management_api_delegate.h | 1 - .../pdf_viewer_private_api.cc | 1 - .../runtime/electron_runtime_api_delegate.cc | 1 - .../streams_private/streams_private_api.cc | 1 - shell/browser/extensions/api/tabs/tabs_api.cc | 4 +++- ...on_component_extension_resource_manager.cc | 1 - .../electron_extensions_browser_client.cc | 2 -- .../electron_extensions_browser_client.h | 1 - .../extensions/electron_messaging_delegate.cc | 1 - .../electron_process_manager_delegate.cc | 1 - shell/browser/fake_location_provider.cc | 1 - shell/browser/file_select_helper.cc | 1 - shell/browser/file_select_helper.h | 2 -- shell/browser/hid/electron_hid_delegate.cc | 1 + shell/browser/hid/electron_hid_delegate.h | 1 - shell/browser/hid/hid_chooser_context.cc | 6 ++---- shell/browser/hid/hid_chooser_context.h | 4 ++-- shell/browser/hid/hid_chooser_controller.h | 8 ++++++- shell/browser/linux/unity_service.cc | 2 -- shell/browser/login_handler.cc | 1 - .../mac/electron_application_delegate.mm | 2 +- shell/browser/mac/in_app_purchase_observer.h | 1 - .../media/media_capture_devices_dispatcher.h | 1 - shell/browser/native_window.cc | 3 +-- shell/browser/native_window.h | 3 +-- shell/browser/native_window_mac.h | 1 + shell/browser/native_window_mac.mm | 1 - shell/browser/native_window_views.cc | 3 --- shell/browser/native_window_views_win.cc | 3 +-- shell/browser/net/asar/asar_file_validator.h | 2 -- shell/browser/net/asar/asar_url_loader.cc | 1 - .../net/electron_url_loader_factory.cc | 1 - shell/browser/net/network_context_service.cc | 1 + shell/browser/net/network_context_service.h | 7 ++++++- .../net/network_context_service_factory.cc | 1 + .../net/proxying_url_loader_factory.cc | 1 - .../browser/net/proxying_url_loader_factory.h | 1 - shell/browser/net/proxying_websocket.cc | 1 - .../net/system_network_context_manager.cc | 2 -- .../net/system_network_context_manager.h | 2 -- shell/browser/network_hints_handler_impl.cc | 1 - .../win/notification_presenter_win.cc | 1 - shell/browser/osr/osr_host_display_client.h | 5 +++-- .../osr/osr_host_display_client_mac.mm | 2 ++ .../osr/osr_render_widget_host_view.cc | 2 +- .../browser/osr/osr_render_widget_host_view.h | 21 ++++++++++++------- shell/browser/osr/osr_video_consumer.cc | 2 ++ shell/browser/osr/osr_view_proxy.h | 3 ++- .../printing/print_view_manager_electron.cc | 1 - .../printing/print_view_manager_electron.h | 8 +++---- shell/browser/protocol_registry.cc | 1 - shell/browser/relauncher.cc | 1 - shell/browser/relauncher_win.cc | 1 - .../browser/serial/serial_chooser_context.cc | 1 + shell/browser/serial/serial_chooser_context.h | 4 +++- .../serial/serial_chooser_controller.h | 5 ++++- shell/browser/special_storage_policy.cc | 1 - shell/browser/ui/autofill_popup.cc | 2 -- .../ui/cocoa/electron_menu_controller.mm | 1 + shell/browser/ui/devtools_manager_delegate.cc | 1 - shell/browser/ui/drag_util.cc | 2 +- shell/browser/ui/drag_util.h | 9 ++++++-- shell/browser/ui/drag_util_mac.mm | 2 ++ ...electron_desktop_window_tree_host_linux.cc | 3 ++- .../electron_desktop_window_tree_host_linux.h | 7 ++++--- shell/browser/ui/file_dialog_linux.cc | 3 +-- shell/browser/ui/gtk/menu_gtk.h | 1 - shell/browser/ui/gtk/menu_util.cc | 1 - shell/browser/ui/gtk/menu_util.h | 5 ++++- shell/browser/ui/inspectable_web_contents.cc | 1 - .../ui/inspectable_web_contents_delegate.h | 4 +++- shell/browser/ui/message_box_gtk.cc | 1 - shell/browser/ui/message_box_mac.mm | 1 - shell/browser/ui/run_all_unittests.cc | 1 - shell/browser/ui/views/autofill_popup_view.h | 5 ++++- .../caption_button_placeholder_container.cc | 3 --- .../ui/views/client_frame_view_linux.h | 3 +++ shell/browser/ui/views/frameless_view.cc | 2 -- shell/browser/ui/views/menu_delegate.h | 4 ++++ shell/browser/ui/views/opaque_frame_view.cc | 3 +-- shell/browser/ui/views/opaque_frame_view.h | 6 +++--- shell/browser/ui/views/root_view.h | 1 - shell/browser/ui/views/submenu_button.cc | 1 + shell/browser/ui/views/submenu_button.h | 6 ++++-- shell/browser/ui/views/win_caption_button.cc | 1 + .../ui/views/win_caption_button_container.cc | 4 ++++ shell/browser/ui/views/win_frame_view.cc | 1 - shell/browser/ui/views/win_frame_view.h | 3 ++- shell/browser/ui/views/win_icon_painter.cc | 3 --- shell/browser/ui/webui/accessibility_ui.cc | 2 -- .../electron_desktop_native_widget_aura.cc | 1 + .../win/electron_desktop_native_widget_aura.h | 3 ++- .../electron_desktop_window_tree_host_win.cc | 4 +--- .../electron_desktop_window_tree_host_win.h | 3 ++- shell/browser/ui/win/notify_icon.cc | 3 --- shell/browser/ui/win/taskbar_host.h | 1 - shell/browser/usb/electron_usb_delegate.cc | 1 + shell/browser/usb/usb_chooser_context.cc | 2 +- shell/browser/usb/usb_chooser_context.h | 4 ++-- shell/browser/usb/usb_chooser_controller.cc | 2 +- shell/browser/usb/usb_chooser_controller.h | 8 ++++++- .../browser/web_contents_permission_helper.cc | 1 + shell/browser/web_contents_preferences.cc | 1 - shell/common/api/electron_api_clipboard.cc | 2 -- shell/common/api/electron_bindings.cc | 1 + shell/common/electron_constants.h | 1 - shell/common/language_util_win.cc | 1 - shell/common/logging.cc | 1 - shell/common/node_bindings.h | 1 - shell/common/node_util.h | 1 - shell/common/platform_util_mac.mm | 1 - shell/common/platform_util_win.cc | 1 - .../api/electron_api_spell_check_client.h | 1 - .../browser_exposed_renderer_interfaces.cc | 1 - ...lectron_extensions_renderer_api_provider.h | 2 -- shell/renderer/pepper_helper.h | 1 - shell/renderer/renderer_client_base.cc | 1 - shell/renderer/renderer_client_base.h | 2 -- shell/services/node/parent_port.cc | 2 ++ shell/services/node/parent_port.h | 2 +- 160 files changed, 180 insertions(+), 217 deletions(-) diff --git a/shell/app/electron_content_client.cc b/shell/app/electron_content_client.cc index 4b195f505c..2bf129da84 100644 --- a/shell/app/electron_content_client.cc +++ b/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" diff --git a/shell/app/electron_crash_reporter_client.cc b/shell/app/electron_crash_reporter_client.cc index 6a01219030..28cb6b0bf8 100644 --- a/shell/app/electron_crash_reporter_client.cc +++ b/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" diff --git a/shell/app/electron_main_delegate.h b/shell/app/electron_main_delegate.h index e8929bf103..ebc8bd6792 100644 --- a/shell/app/electron_main_delegate.h +++ b/shell/app/electron_main_delegate.h @@ -9,7 +9,10 @@ #include #include "content/public/app/content_main_delegate.h" -#include "content/public/common/content_client.h" + +namespace content { +class Client; +} namespace tracing { class TracingSamplerProfiler; diff --git a/shell/app/electron_main_win.cc b/shell/app/electron_main_win.cc index c205a00b3d..75eee069a7 100644 --- a/shell/app/electron_main_win.cc +++ b/shell/app/electron_main_win.cc @@ -17,12 +17,12 @@ #include #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" diff --git a/shell/app/uv_task_runner.h b/shell/app/uv_task_runner.h index d792d2711a..7f23826db1 100644 --- a/shell/app/uv_task_runner.h +++ b/shell/app/uv_task_runner.h @@ -7,7 +7,6 @@ #include -#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) diff --git a/shell/browser/api/electron_api_app.cc b/shell/browser/api/electron_api_app.cc index 1e1a5da2f7..a93b8d672a 100644 --- a/shell/browser/api/electron_api_app.cc +++ b/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" diff --git a/shell/browser/api/electron_api_app.h b/shell/browser/api/electron_api_app.h index 10bb09985e..d158d20a8b 100644 --- a/shell/browser/api/electron_api_app.h +++ b/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 diff --git a/shell/browser/api/electron_api_app_mac.mm b/shell/browser/api/electron_api_app_mac.mm index 5415c8cfac..37bf73426a 100644 --- a/shell/browser/api/electron_api_app_mac.mm +++ b/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 #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" diff --git a/shell/browser/api/electron_api_browser_window.cc b/shell/browser/api/electron_api_browser_window.cc index b1ea0974bf..cd757612af 100644 --- a/shell/browser/api/electron_api_browser_window.cc +++ b/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, diff --git a/shell/browser/api/electron_api_crash_reporter.cc b/shell/browser/api/electron_api_crash_reporter.cc index aa293ab1ee..8058838c1d 100644 --- a/shell/browser/api/electron_api_crash_reporter.cc +++ b/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" diff --git a/shell/browser/api/electron_api_crash_reporter.h b/shell/browser/api/electron_api_crash_reporter.h index 8b96b8e929..6b2f1c58b3 100644 --- a/shell/browser/api/electron_api_crash_reporter.h +++ b/shell/browser/api/electron_api_crash_reporter.h @@ -7,7 +7,8 @@ #include #include -#include "base/files/file_path.h" + +#include "build/build_config.h" namespace electron::api::crash_reporter { diff --git a/shell/browser/api/electron_api_debugger.h b/shell/browser/api/electron_api_debugger.h index c2c669b8c3..3bbc0f0423 100644 --- a/shell/browser/api/electron_api_debugger.h +++ b/shell/browser/api/electron_api_debugger.h @@ -7,7 +7,6 @@ #include -#include "base/functional/callback.h" #include "base/memory/raw_ptr.h" #include "base/values.h" #include "content/public/browser/devtools_agent_host_client.h" diff --git a/shell/browser/api/electron_api_event_emitter.cc b/shell/browser/api/electron_api_event_emitter.cc index 26062935d2..d346b757e2 100644 --- a/shell/browser/api/electron_api_event_emitter.cc +++ b/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" diff --git a/shell/browser/api/electron_api_menu.h b/shell/browser/api/electron_api_menu.h index d18babaaa8..2191c412aa 100644 --- a/shell/browser/api/electron_api_menu.h +++ b/shell/browser/api/electron_api_menu.h @@ -8,7 +8,6 @@ #include #include -#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" diff --git a/shell/browser/api/electron_api_menu_mac.mm b/shell/browser/api/electron_api_menu_mac.mm index c07a4264a4..aac780025d 100644 --- a/shell/browser/api/electron_api_menu_mac.mm +++ b/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" diff --git a/shell/browser/api/electron_api_net_log.h b/shell/browser/api/electron_api_net_log.h index 3a745ca695..0cc0c1b15c 100644 --- a/shell/browser/api/electron_api_net_log.h +++ b/shell/browser/api/electron_api_net_log.h @@ -8,7 +8,6 @@ #include #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" diff --git a/shell/browser/api/electron_api_power_monitor_win.cc b/shell/browser/api/electron_api_power_monitor_win.cc index 3e408c1182..e08e191b42 100644 --- a/shell/browser/api/electron_api_power_monitor_win.cc +++ b/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 { diff --git a/shell/browser/api/electron_api_safe_storage.cc b/shell/browser/api/electron_api_safe_storage.cc index 2bbf774c2b..b1704754d1 100644 --- a/shell/browser/api/electron_api_safe_storage.cc +++ b/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 { diff --git a/shell/browser/api/electron_api_system_preferences_win.cc b/shell/browser/api/electron_api_system_preferences_win.cc index b510c9683b..eeeb7361c2 100644 --- a/shell/browser/api/electron_api_system_preferences_win.cc +++ b/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" diff --git a/shell/browser/api/electron_api_tray.h b/shell/browser/api/electron_api_tray.h index 9eaebb5066..2eb7126673 100644 --- a/shell/browser/api/electron_api_tray.h +++ b/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" diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index ecdd929a24..fb671694de 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -5,6 +5,7 @@ #include "shell/browser/api/electron_api_web_contents.h" #include +#include #include #include #include @@ -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 diff --git a/shell/browser/api/electron_api_web_contents.h b/shell/browser/api/electron_api_web_contents.h index 8f7956f20e..df5e8c31dd 100644 --- a/shell/browser/api/electron_api_web_contents.h +++ b/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 { diff --git a/shell/browser/api/save_page_handler.cc b/shell/browser/api/save_page_handler.cc index c6837e9fc9..b06fda2741 100644 --- a/shell/browser/api/save_page_handler.cc +++ b/shell/browser/api/save_page_handler.cc @@ -7,7 +7,6 @@ #include #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" diff --git a/shell/browser/auto_updater.cc b/shell/browser/auto_updater.cc index 519f84a83e..cd6c9d8676 100644 --- a/shell/browser/auto_updater.cc +++ b/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 { diff --git a/shell/browser/auto_updater.h b/shell/browser/auto_updater.h index 017c702ba6..be2487c22d 100644 --- a/shell/browser/auto_updater.h +++ b/shell/browser/auto_updater.h @@ -8,8 +8,6 @@ #include #include -#include "build/build_config.h" - namespace base { class Time; } diff --git a/shell/browser/badging/badge_manager.cc b/shell/browser/badging/badge_manager.cc index 3de1482bfb..c7811e56ef 100755 --- a/shell/browser/badging/badge_manager.cc +++ b/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" diff --git a/shell/browser/bluetooth/electron_bluetooth_delegate.cc b/shell/browser/bluetooth/electron_bluetooth_delegate.cc index 3616c55b03..8db70add67 100644 --- a/shell/browser/bluetooth/electron_bluetooth_delegate.cc +++ b/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" diff --git a/shell/browser/bluetooth/electron_bluetooth_delegate.h b/shell/browser/bluetooth/electron_bluetooth_delegate.h index a5c90f50a6..a53353b119 100644 --- a/shell/browser/bluetooth/electron_bluetooth_delegate.h +++ b/shell/browser/bluetooth/electron_bluetooth_delegate.h @@ -11,8 +11,8 @@ #include #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 { diff --git a/shell/browser/browser.cc b/shell/browser/browser.cc index 8680c04f00..928c19cdf4 100644 --- a/shell/browser/browser.cc +++ b/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" diff --git a/shell/browser/browser.h b/shell/browser/browser.h index d554fb0e00..6d098812cd 100644 --- a/shell/browser/browser.h +++ b/shell/browser/browser.h @@ -10,6 +10,7 @@ #include #include +#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 { diff --git a/shell/browser/browser_observer.h b/shell/browser/browser_observer.h index e4ab06fde1..a5146660d5 100644 --- a/shell/browser/browser_observer.h +++ b/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 { diff --git a/shell/browser/browser_process_impl.cc b/shell/browser/browser_process_impl.cc index c27d9afb75..6b98426e84 100644 --- a/shell/browser/browser_process_impl.cc +++ b/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" diff --git a/shell/browser/browser_win.cc b/shell/browser/browser_win.cc index 077a786280..3d261fe495 100644 --- a/shell/browser/browser_win.cc +++ b/shell/browser/browser_win.cc @@ -15,6 +15,7 @@ #include // 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" diff --git a/shell/browser/electron_autofill_driver_factory.cc b/shell/browser/electron_autofill_driver_factory.cc index 9aa01c23f1..edbea8e4b0 100644 --- a/shell/browser/electron_autofill_driver_factory.cc +++ b/shell/browser/electron_autofill_driver_factory.cc @@ -8,7 +8,6 @@ #include #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" diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index 8e28587a58..5f96f1ca2d 100644 --- a/shell/browser/electron_browser_client.cc +++ b/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" diff --git a/shell/browser/electron_browser_client.h b/shell/browser/electron_browser_client.h index e1e69adeef..7276467ade 100644 --- a/shell/browser/electron_browser_client.h +++ b/shell/browser/electron_browser_client.h @@ -30,6 +30,7 @@ namespace content { class ClientCertificateDelegate; +class PlatformNotificationService; class QuotaPermissionContext; } // namespace content diff --git a/shell/browser/electron_browser_main_parts.cc b/shell/browser/electron_browser_main_parts.cc index 5882e0d78b..218e7f5ee2 100644 --- a/shell/browser/electron_browser_main_parts.cc +++ b/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" diff --git a/shell/browser/electron_browser_main_parts_mac.mm b/shell/browser/electron_browser_main_parts_mac.mm index 975853b2f5..c7c093010e 100644 --- a/shell/browser/electron_browser_main_parts_mac.mm +++ b/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 { diff --git a/shell/browser/electron_permission_manager.cc b/shell/browser/electron_permission_manager.cc index 41a47c7eed..31089aa50e 100644 --- a/shell/browser/electron_permission_manager.cc +++ b/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" diff --git a/shell/browser/electron_permission_manager.h b/shell/browser/electron_permission_manager.h index 9c6ff7af30..af8e85b686 100644 --- a/shell/browser/electron_permission_manager.h +++ b/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(); diff --git a/shell/browser/extensions/api/management/electron_management_api_delegate.h b/shell/browser/extensions/api/management/electron_management_api_delegate.h index 65030697ce..7b415b855b 100644 --- a/shell/browser/extensions/api/management/electron_management_api_delegate.h +++ b/shell/browser/extensions/api/management/electron_management_api_delegate.h @@ -8,7 +8,6 @@ #include #include -#include "base/task/cancelable_task_tracker.h" #include "extensions/browser/api/management/management_api_delegate.h" #include "extensions/common/extension_id.h" diff --git a/shell/browser/extensions/api/pdf_viewer_private/pdf_viewer_private_api.cc b/shell/browser/extensions/api/pdf_viewer_private/pdf_viewer_private_api.cc index df1a36390c..bab4336953 100644 --- a/shell/browser/extensions/api/pdf_viewer_private/pdf_viewer_private_api.cc +++ b/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 { diff --git a/shell/browser/extensions/api/runtime/electron_runtime_api_delegate.cc b/shell/browser/extensions/api/runtime/electron_runtime_api_delegate.cc index be69be338f..d41b2acc27 100644 --- a/shell/browser/extensions/api/runtime/electron_runtime_api_delegate.cc +++ b/shell/browser/extensions/api/runtime/electron_runtime_api_delegate.cc @@ -6,7 +6,6 @@ #include -#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" diff --git a/shell/browser/extensions/api/streams_private/streams_private_api.cc b/shell/browser/extensions/api/streams_private/streams_private_api.cc index 9d015c151b..c5a7001854 100644 --- a/shell/browser/extensions/api/streams_private/streams_private_api.cc +++ b/shell/browser/extensions/api/streams_private/streams_private_api.cc @@ -8,7 +8,6 @@ #include #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" diff --git a/shell/browser/extensions/api/tabs/tabs_api.cc b/shell/browser/extensions/api/tabs/tabs_api.cc index 9fcb8efdb1..a7205bae7b 100644 --- a/shell/browser/extensions/api/tabs/tabs_api.cc +++ b/shell/browser/extensions/api/tabs/tabs_api.cc @@ -4,8 +4,10 @@ #include "shell/browser/extensions/api/tabs/tabs_api.h" -#include +#include +#include #include +#include #include "base/command_line.h" #include "base/strings/pattern.h" diff --git a/shell/browser/extensions/electron_component_extension_resource_manager.cc b/shell/browser/extensions/electron_component_extension_resource_manager.cc index 34f664ec51..b675f630b9 100644 --- a/shell/browser/extensions/electron_component_extension_resource_manager.cc +++ b/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" diff --git a/shell/browser/extensions/electron_extensions_browser_client.cc b/shell/browser/extensions/electron_extensions_browser_client.cc index e3d4e5338a..3f235e2095 100644 --- a/shell/browser/extensions/electron_extensions_browser_client.cc +++ b/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" diff --git a/shell/browser/extensions/electron_extensions_browser_client.h b/shell/browser/extensions/electron_extensions_browser_client.h index 89a29ce468..1e0fd04f78 100644 --- a/shell/browser/extensions/electron_extensions_browser_client.h +++ b/shell/browser/extensions/electron_extensions_browser_client.h @@ -9,7 +9,6 @@ #include #include -#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" diff --git a/shell/browser/extensions/electron_messaging_delegate.cc b/shell/browser/extensions/electron_messaging_delegate.cc index a534759a0b..711f426ec1 100644 --- a/shell/browser/extensions/electron_messaging_delegate.cc +++ b/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" diff --git a/shell/browser/extensions/electron_process_manager_delegate.cc b/shell/browser/extensions/electron_process_manager_delegate.cc index ce9df4a071..8b61178ef7 100644 --- a/shell/browser/extensions/electron_process_manager_delegate.cc +++ b/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" diff --git a/shell/browser/fake_location_provider.cc b/shell/browser/fake_location_provider.cc index eaeb075d57..60d1c51490 100644 --- a/shell/browser/fake_location_provider.cc +++ b/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" diff --git a/shell/browser/file_select_helper.cc b/shell/browser/file_select_helper.cc index fc80a64fbd..45e03035c2 100644 --- a/shell/browser/file_select_helper.cc +++ b/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" diff --git a/shell/browser/file_select_helper.h b/shell/browser/file_select_helper.h index 0035c68cfe..7bd21ab509 100644 --- a/shell/browser/file_select_helper.h +++ b/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" diff --git a/shell/browser/hid/electron_hid_delegate.cc b/shell/browser/hid/electron_hid_delegate.cc index 017a95b8cc..1058dc7897 100644 --- a/shell/browser/hid/electron_hid_delegate.cc +++ b/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" diff --git a/shell/browser/hid/electron_hid_delegate.h b/shell/browser/hid/electron_hid_delegate.h index 7c2f703781..b1c1f87789 100644 --- a/shell/browser/hid/electron_hid_delegate.h +++ b/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" diff --git a/shell/browser/hid/hid_chooser_context.cc b/shell/browser/hid/hid_chooser_context.cc index 34dc9092e4..147c10af0e 100644 --- a/shell/browser/hid/hid_chooser_context.cc +++ b/shell/browser/hid/hid_chooser_context.cc @@ -4,11 +4,8 @@ #include "shell/browser/hid/hid_chooser_context.h" -#include - -#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) #include -#endif // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) +#include #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" diff --git a/shell/browser/hid/hid_chooser_context.h b/shell/browser/hid/hid_chooser_context.h index 6d67fab74c..85804c52f5 100644 --- a/shell/browser/hid/hid_chooser_context.h +++ b/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[]; diff --git a/shell/browser/hid/hid_chooser_controller.h b/shell/browser/hid/hid_chooser_controller.h index edc0c08b8c..fc5944979d 100644 --- a/shell/browser/hid/hid_chooser_controller.h +++ b/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; diff --git a/shell/browser/linux/unity_service.cc b/shell/browser/linux/unity_service.cc index 65cb52e3e0..a8710541eb 100644 --- a/shell/browser/linux/unity_service.cc +++ b/shell/browser/linux/unity_service.cc @@ -9,8 +9,6 @@ #include -#include "base/nix/xdg_util.h" - // Unity data typedefs. typedef struct _UnityInspector UnityInspector; typedef UnityInspector* (*unity_inspector_get_default_func)(); diff --git a/shell/browser/login_handler.cc b/shell/browser/login_handler.cc index 44d14b1463..1000507731 100644 --- a/shell/browser/login_handler.cc +++ b/shell/browser/login_handler.cc @@ -6,7 +6,6 @@ #include -#include "base/functional/callback.h" #include "base/task/sequenced_task_runner.h" #include "gin/arguments.h" #include "gin/dictionary.h" diff --git a/shell/browser/mac/electron_application_delegate.mm b/shell/browser/mac/electron_application_delegate.mm index 953e480890..655174d4b4 100644 --- a/shell/browser/mac/electron_application_delegate.mm +++ b/shell/browser/mac/electron_application_delegate.mm @@ -4,11 +4,11 @@ #import "shell/browser/mac/electron_application_delegate.h" -#include #include #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" diff --git a/shell/browser/mac/in_app_purchase_observer.h b/shell/browser/mac/in_app_purchase_observer.h index b8a1b4cdb8..a02903e709 100644 --- a/shell/browser/mac/in_app_purchase_observer.h +++ b/shell/browser/mac/in_app_purchase_observer.h @@ -9,7 +9,6 @@ #include #include -#include "base/functional/callback.h" #include "base/memory/raw_ptr_exclusion.h" #include "base/memory/weak_ptr.h" diff --git a/shell/browser/media/media_capture_devices_dispatcher.h b/shell/browser/media/media_capture_devices_dispatcher.h index 4f173064b1..364aabcb68 100644 --- a/shell/browser/media/media_capture_devices_dispatcher.h +++ b/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" diff --git a/shell/browser/native_window.cc b/shell/browser/native_window.cc index bb1d82fd82..b4ca7c4962 100644 --- a/shell/browser/native_window.cc +++ b/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 diff --git a/shell/browser/native_window.h b/shell/browser/native_window.h index 5256d34a6a..421e1440b7 100644 --- a/shell/browser/native_window.h +++ b/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; diff --git a/shell/browser/native_window_mac.h b/shell/browser/native_window_mac.h index cf6f0c1d9d..363dfecb9a 100644 --- a/shell/browser/native_window_mac.h +++ b/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" diff --git a/shell/browser/native_window_mac.mm b/shell/browser/native_window_mac.mm index fd94b01353..bdc02d2e1d 100644 --- a/shell/browser/native_window_mac.mm +++ b/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" diff --git a/shell/browser/native_window_views.cc b/shell/browser/native_window_views.cc index 6485cf0ec6..a5364f80e0 100644 --- a/shell/browser/native_window_views.cc +++ b/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" diff --git a/shell/browser/native_window_views_win.cc b/shell/browser/native_window_views_win.cc index 9899123909..6f4f3e0e40 100644 --- a/shell/browser/native_window_views_win.cc +++ b/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" diff --git a/shell/browser/net/asar/asar_file_validator.h b/shell/browser/net/asar/asar_file_validator.h index d2e9dfb4ec..aa5bf2a041 100644 --- a/shell/browser/net/asar/asar_file_validator.h +++ b/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 #include -#include #include "crypto/secure_hash.h" #include "mojo/public/cpp/system/file_data_source.h" diff --git a/shell/browser/net/asar/asar_url_loader.cc b/shell/browser/net/asar/asar_url_loader.cc index d13dc55c7d..3acc2d8cc3 100644 --- a/shell/browser/net/asar/asar_url_loader.cc +++ b/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" diff --git a/shell/browser/net/electron_url_loader_factory.cc b/shell/browser/net/electron_url_loader_factory.cc index fd3b0b091b..ae9bdc4b8d 100644 --- a/shell/browser/net/electron_url_loader_factory.cc +++ b/shell/browser/net/electron_url_loader_factory.cc @@ -4,7 +4,6 @@ #include "shell/browser/net/electron_url_loader_factory.h" -#include #include #include #include diff --git a/shell/browser/net/network_context_service.cc b/shell/browser/net/network_context_service.cc index a2b75ea84d..7c465c9991 100644 --- a/shell/browser/net/network_context_service.cc +++ b/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 { diff --git a/shell/browser/net/network_context_service.h b/shell/browser/net/network_context_service.h index 113e576079..e212c97dc6 100644 --- a/shell/browser/net/network_context_service.h +++ b/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 { diff --git a/shell/browser/net/network_context_service_factory.cc b/shell/browser/net/network_context_service_factory.cc index f2c635a533..b74c5671b9 100644 --- a/shell/browser/net/network_context_service_factory.cc +++ b/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 { diff --git a/shell/browser/net/proxying_url_loader_factory.cc b/shell/browser/net/proxying_url_loader_factory.cc index 7c8df6192c..b8f5cf2219 100644 --- a/shell/browser/net/proxying_url_loader_factory.cc +++ b/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" diff --git a/shell/browser/net/proxying_url_loader_factory.h b/shell/browser/net/proxying_url_loader_factory.h index 828c7da67f..3ffd1d416a 100644 --- a/shell/browser/net/proxying_url_loader_factory.h +++ b/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" diff --git a/shell/browser/net/proxying_websocket.cc b/shell/browser/net/proxying_websocket.cc index a14bb2a9cf..9419322139 100644 --- a/shell/browser/net/proxying_websocket.cc +++ b/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 { diff --git a/shell/browser/net/system_network_context_manager.cc b/shell/browser/net/system_network_context_manager.cc index f2785ef8fa..be839e1742 100644 --- a/shell/browser/net/system_network_context_manager.cc +++ b/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" diff --git a/shell/browser/net/system_network_context_manager.h b/shell/browser/net/system_network_context_manager.h index 02b0a08512..a8e9a6e554 100644 --- a/shell/browser/net/system_network_context_manager.h +++ b/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 - #include "chrome/browser/net/proxy_config_monitor.h" #include "mojo/public/cpp/bindings/remote.h" #include "sandbox/policy/features.h" diff --git a/shell/browser/network_hints_handler_impl.cc b/shell/browser/network_hints_handler_impl.cc index 417215d142..ec2f9fac0d 100644 --- a/shell/browser/network_hints_handler_impl.cc +++ b/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" diff --git a/shell/browser/notifications/win/notification_presenter_win.cc b/shell/browser/notifications/win/notification_presenter_win.cc index 407250614d..3f0e1b6e01 100644 --- a/shell/browser/notifications/win/notification_presenter_win.cc +++ b/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" diff --git a/shell/browser/osr/osr_host_display_client.h b/shell/browser/osr/osr_host_display_client.h index 3cd58f5409..a47aaf67f3 100644 --- a/shell/browser/osr/osr_host_display_client.h +++ b/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 diff --git a/shell/browser/osr/osr_host_display_client_mac.mm b/shell/browser/osr/osr_host_display_client_mac.mm index 73d40f81ba..f171474323 100644 --- a/shell/browser/osr/osr_host_display_client_mac.mm +++ b/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 diff --git a/shell/browser/osr/osr_render_widget_host_view.cc b/shell/browser/osr/osr_render_widget_host_view.cc index 8ec96213bd..0542eac860 100644 --- a/shell/browser/osr/osr_render_widget_host_view.cc +++ b/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" diff --git a/shell/browser/osr/osr_render_widget_host_view.h b/shell/browser/osr/osr_render_widget_host_view.h index cfd192d26b..3b6971c8b1 100644 --- a/shell/browser/osr/osr_render_widget_host_view.h +++ b/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 - OnPaintCallback; -typedef base::RepeatingCallback OnPopupPaintCallback; +using OnPaintCallback = + base::RepeatingCallback; +using OnPopupPaintCallback = base::RepeatingCallback; class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase, diff --git a/shell/browser/osr/osr_video_consumer.cc b/shell/browser/osr/osr_video_consumer.cc index 818c98ef0e..a921fc6d8d 100644 --- a/shell/browser/osr/osr_video_consumer.cc +++ b/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 { diff --git a/shell/browser/osr/osr_view_proxy.h b/shell/browser/osr/osr_view_proxy.h index 0450762442..22fc091887 100644 --- a/shell/browser/osr/osr_view_proxy.h +++ b/shell/browser/osr/osr_view_proxy.h @@ -8,11 +8,12 @@ #include #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; diff --git a/shell/browser/printing/print_view_manager_electron.cc b/shell/browser/printing/print_view_manager_electron.cc index 9f2c63929e..bda9d67507 100644 --- a/shell/browser/printing/print_view_manager_electron.cc +++ b/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" diff --git a/shell/browser/printing/print_view_manager_electron.h b/shell/browser/printing/print_view_manager_electron.h index 362c85359b..4206d42727 100644 --- a/shell/browser/printing/print_view_manager_electron.h +++ b/shell/browser/printing/print_view_manager_electron.h @@ -9,14 +9,14 @@ #include #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 { diff --git a/shell/browser/protocol_registry.cc b/shell/browser/protocol_registry.cc index d680f48b16..ad88e95be7 100644 --- a/shell/browser/protocol_registry.cc +++ b/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" diff --git a/shell/browser/relauncher.cc b/shell/browser/relauncher.cc index a3454196ba..c15221181c 100644 --- a/shell/browser/relauncher.cc +++ b/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" diff --git a/shell/browser/relauncher_win.cc b/shell/browser/relauncher_win.cc index 6d69b171a3..5d0d0d2ed6 100644 --- a/shell/browser/relauncher_win.cc +++ b/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 { diff --git a/shell/browser/serial/serial_chooser_context.cc b/shell/browser/serial/serial_chooser_context.cc index ec5ac12c73..fe24160010 100644 --- a/shell/browser/serial/serial_chooser_context.cc +++ b/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" diff --git a/shell/browser/serial/serial_chooser_context.h b/shell/browser/serial/serial_chooser_context.h index baccf465d3..f04f9a54ea 100644 --- a/shell/browser/serial/serial_chooser_context.h +++ b/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 diff --git a/shell/browser/serial/serial_chooser_controller.h b/shell/browser/serial/serial_chooser_controller.h index aff668edae..3ea152b8dc 100644 --- a/shell/browser/serial/serial_chooser_controller.h +++ b/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. diff --git a/shell/browser/special_storage_policy.cc b/shell/browser/special_storage_policy.cc index 74541727be..b2818971cf 100644 --- a/shell/browser/special_storage_policy.cc +++ b/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 { diff --git a/shell/browser/ui/autofill_popup.cc b/shell/browser/ui/autofill_popup.cc index 5b051098fb..341258ec0e 100644 --- a/shell/browser/ui/autofill_popup.cc +++ b/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" diff --git a/shell/browser/ui/cocoa/electron_menu_controller.mm b/shell/browser/ui/cocoa/electron_menu_controller.mm index 7ee1ced9e5..dc7a32ee5c 100644 --- a/shell/browser/ui/cocoa/electron_menu_controller.mm +++ b/shell/browser/ui/cocoa/electron_menu_controller.mm @@ -9,6 +9,7 @@ #include #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" diff --git a/shell/browser/ui/devtools_manager_delegate.cc b/shell/browser/ui/devtools_manager_delegate.cc index 439ac68f5b..e62729171b 100644 --- a/shell/browser/ui/devtools_manager_delegate.cc +++ b/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" diff --git a/shell/browser/ui/drag_util.cc b/shell/browser/ui/drag_util.cc index 1710cb8ea1..1cbe3f20bb 100644 --- a/shell/browser/ui/drag_util.cc +++ b/shell/browser/ui/drag_util.cc @@ -5,7 +5,7 @@ #include "shell/browser/ui/drag_util.h" #include "third_party/blink/public/mojom/page/draggable_region.mojom.h" -#include "ui/gfx/geometry/skia_conversions.h" +#include "third_party/skia/include/core/SkRegion.h" namespace electron { diff --git a/shell/browser/ui/drag_util.h b/shell/browser/ui/drag_util.h index 92385fcb27..0c7c35e7ba 100644 --- a/shell/browser/ui/drag_util.h +++ b/shell/browser/ui/drag_util.h @@ -10,13 +10,18 @@ #include "electron/shell/common/api/api.mojom.h" #include "third_party/blink/public/mojom/page/draggable_region.mojom-forward.h" -#include "third_party/skia/include/core/SkRegion.h" -#include "ui/gfx/image/image.h" +#include "ui/gfx/native_widget_types.h" + +class SkRegion; namespace base { class FilePath; } +namespace gfx { +class Image; +} + namespace electron { void DragFileItems(const std::vector& files, diff --git a/shell/browser/ui/drag_util_mac.mm b/shell/browser/ui/drag_util_mac.mm index 013f868f95..d0576830ef 100644 --- a/shell/browser/ui/drag_util_mac.mm +++ b/shell/browser/ui/drag_util_mac.mm @@ -10,6 +10,8 @@ #include "base/apple/foundation_util.h" #include "base/files/file_path.h" +#include "third_party/skia/include/core/SkImageInfo.h" +#include "ui/gfx/image/image.h" // Contents largely copied from // chrome/browser/download/drag_download_item_mac.mm. diff --git a/shell/browser/ui/electron_desktop_window_tree_host_linux.cc b/shell/browser/ui/electron_desktop_window_tree_host_linux.cc index d384f1d60c..eb0723f78a 100644 --- a/shell/browser/ui/electron_desktop_window_tree_host_linux.cc +++ b/shell/browser/ui/electron_desktop_window_tree_host_linux.cc @@ -13,7 +13,9 @@ #include "base/feature_list.h" #include "base/i18n/rtl.h" #include "shell/browser/native_window_features.h" +#include "shell/browser/native_window_views.h" #include "shell/browser/ui/views/client_frame_view_linux.h" +#include "third_party/skia/include/core/SkRegion.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/skia_conversions.h" #include "ui/linux/linux_ui.h" @@ -21,7 +23,6 @@ #include "ui/platform_window/platform_window.h" #include "ui/views/widget/desktop_aura/desktop_window_tree_host.h" #include "ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h" -#include "ui/views/window/non_client_view.h" namespace electron { diff --git a/shell/browser/ui/electron_desktop_window_tree_host_linux.h b/shell/browser/ui/electron_desktop_window_tree_host_linux.h index 29bc4254a4..f68b219c23 100644 --- a/shell/browser/ui/electron_desktop_window_tree_host_linux.h +++ b/shell/browser/ui/electron_desktop_window_tree_host_linux.h @@ -11,16 +11,17 @@ #include "base/memory/raw_ptr.h" #include "base/scoped_observation.h" -#include "shell/browser/native_window_views.h" -#include "shell/browser/ui/views/client_frame_view_linux.h" -#include "third_party/skia/include/core/SkRRect.h" #include "ui/linux/device_scale_factor_observer.h" +#include "ui/linux/linux_ui.h" #include "ui/native_theme/native_theme_observer.h" #include "ui/platform_window/platform_window.h" #include "ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h" namespace electron { +class ClientFrameViewLinux; +class NativeWindowViews; + class ElectronDesktopWindowTreeHostLinux : public views::DesktopWindowTreeHostLinux, private ui::NativeThemeObserver, diff --git a/shell/browser/ui/file_dialog_linux.cc b/shell/browser/ui/file_dialog_linux.cc index 5efe45eb70..7910367f4a 100644 --- a/shell/browser/ui/file_dialog_linux.cc +++ b/shell/browser/ui/file_dialog_linux.cc @@ -2,8 +2,7 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#include -#include +#include #include "base/files/file_util.h" #include "base/functional/bind.h" diff --git a/shell/browser/ui/gtk/menu_gtk.h b/shell/browser/ui/gtk/menu_gtk.h index 4ea65b7b45..0ea6217b02 100644 --- a/shell/browser/ui/gtk/menu_gtk.h +++ b/shell/browser/ui/gtk/menu_gtk.h @@ -5,7 +5,6 @@ #ifndef ELECTRON_SHELL_BROWSER_UI_GTK_MENU_GTK_H_ #define ELECTRON_SHELL_BROWSER_UI_GTK_MENU_GTK_H_ -#include "base/functional/callback.h" #include "base/memory/raw_ptr.h" #include "ui/base/glib/scoped_gobject.h" #include "ui/base/glib/scoped_gsignal.h" diff --git a/shell/browser/ui/gtk/menu_util.cc b/shell/browser/ui/gtk/menu_util.cc index 8eb5810009..5870a85414 100644 --- a/shell/browser/ui/gtk/menu_util.cc +++ b/shell/browser/ui/gtk/menu_util.cc @@ -14,7 +14,6 @@ #include "chrome/app/chrome_command_ids.h" #include "shell/browser/ui/gtk_util.h" #include "third_party/skia/include/core/SkBitmap.h" -#include "third_party/skia/include/core/SkUnPreMultiply.h" #include "ui/base/accelerators/accelerator.h" #include "ui/base/accelerators/menu_label_accelerator_util_linux.h" #include "ui/base/models/image_model.h" diff --git a/shell/browser/ui/gtk/menu_util.h b/shell/browser/ui/gtk/menu_util.h index 2b7116d268..155cb8415f 100644 --- a/shell/browser/ui/gtk/menu_util.h +++ b/shell/browser/ui/gtk/menu_util.h @@ -11,7 +11,10 @@ #include "base/functional/callback.h" #include "ui/base/glib/scoped_gsignal.h" -#include "ui/gfx/image/image.h" + +namespace gfx { +class Image; +} namespace ui { class MenuModel; diff --git a/shell/browser/ui/inspectable_web_contents.cc b/shell/browser/ui/inspectable_web_contents.cc index 2236d83910..2acff1b4c0 100644 --- a/shell/browser/ui/inspectable_web_contents.cc +++ b/shell/browser/ui/inspectable_web_contents.cc @@ -64,7 +64,6 @@ #include "content/public/browser/render_process_host.h" #include "extensions/browser/extension_registry.h" #include "extensions/common/permissions/permissions_data.h" -#include "shell/browser/electron_browser_context.h" #endif namespace electron { diff --git a/shell/browser/ui/inspectable_web_contents_delegate.h b/shell/browser/ui/inspectable_web_contents_delegate.h index c73a7fd74f..91f2f12362 100644 --- a/shell/browser/ui/inspectable_web_contents_delegate.h +++ b/shell/browser/ui/inspectable_web_contents_delegate.h @@ -8,7 +8,9 @@ #include -#include "base/files/file_path.h" +namespace base { +class FilePath; +} namespace electron { diff --git a/shell/browser/ui/message_box_gtk.cc b/shell/browser/ui/message_box_gtk.cc index c215dfbe04..338975d6d6 100644 --- a/shell/browser/ui/message_box_gtk.cc +++ b/shell/browser/ui/message_box_gtk.cc @@ -7,7 +7,6 @@ #include "base/containers/contains.h" #include "base/containers/flat_map.h" #include "base/functional/bind.h" -#include "base/functional/callback.h" #include "base/memory/raw_ptr.h" #include "base/memory/raw_ptr_exclusion.h" #include "base/no_destructor.h" diff --git a/shell/browser/ui/message_box_mac.mm b/shell/browser/ui/message_box_mac.mm index c1cce045f6..373fab1b54 100644 --- a/shell/browser/ui/message_box_mac.mm +++ b/shell/browser/ui/message_box_mac.mm @@ -10,7 +10,6 @@ #include "base/containers/contains.h" #include "base/containers/flat_map.h" -#include "base/functional/callback.h" #include "base/mac/mac_util.h" #include "base/no_destructor.h" #include "base/strings/sys_string_conversions.h" diff --git a/shell/browser/ui/run_all_unittests.cc b/shell/browser/ui/run_all_unittests.cc index 99c78acdb6..8063e93d29 100644 --- a/shell/browser/ui/run_all_unittests.cc +++ b/shell/browser/ui/run_all_unittests.cc @@ -5,7 +5,6 @@ #include "base/functional/bind.h" #include "base/test/launcher/unit_test_launcher.h" #include "base/test/test_suite.h" -#include "build/build_config.h" int main(int argc, char** argv) { base::TestSuite test_suite(argc, argv); diff --git a/shell/browser/ui/views/autofill_popup_view.h b/shell/browser/ui/views/autofill_popup_view.h index 5c9a5bad76..dfbe956cc1 100644 --- a/shell/browser/ui/views/autofill_popup_view.h +++ b/shell/browser/ui/views/autofill_popup_view.h @@ -15,7 +15,6 @@ #include "content/public/browser/render_widget_host.h" #include "electron/buildflags/buildflags.h" #include "shell/browser/osr/osr_view_proxy.h" -#include "ui/accessibility/ax_node_data.h" #include "ui/base/metadata/metadata_header_macros.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/views/drag_controller.h" @@ -23,6 +22,10 @@ #include "ui/views/widget/widget_delegate.h" #include "ui/views/widget/widget_observer.h" +namespace ui { +struct AXNodeData; +} + namespace electron { const int kPopupBorderThickness = 1; diff --git a/shell/browser/ui/views/caption_button_placeholder_container.cc b/shell/browser/ui/views/caption_button_placeholder_container.cc index ac77c6149a..8e1137abc4 100644 --- a/shell/browser/ui/views/caption_button_placeholder_container.cc +++ b/shell/browser/ui/views/caption_button_placeholder_container.cc @@ -5,9 +5,6 @@ #include "shell/browser/ui/views/caption_button_placeholder_container.h" #include "ui/base/metadata/metadata_impl_macros.h" -#include "ui/gfx/canvas.h" -#include "ui/gfx/scoped_canvas.h" -#include "ui/views/view.h" CaptionButtonPlaceholderContainer::CaptionButtonPlaceholderContainer() { SetPaintToLayer(); diff --git a/shell/browser/ui/views/client_frame_view_linux.h b/shell/browser/ui/views/client_frame_view_linux.h index 552760514d..c05632de86 100644 --- a/shell/browser/ui/views/client_frame_view_linux.h +++ b/shell/browser/ui/views/client_frame_view_linux.h @@ -13,6 +13,7 @@ #include "base/memory/raw_ptr_exclusion.h" #include "base/scoped_observation.h" #include "shell/browser/ui/views/frameless_view.h" +#include "third_party/skia/include/core/SkRRect.h" #include "ui/base/metadata/metadata_header_macros.h" #include "ui/base/ui_base_types.h" #include "ui/linux/linux_ui.h" @@ -28,6 +29,8 @@ namespace electron { +class NativeWindowViews; + class ClientFrameViewLinux : public FramelessView, private ui::NativeThemeObserver, private ui::WindowButtonOrderObserver { diff --git a/shell/browser/ui/views/frameless_view.cc b/shell/browser/ui/views/frameless_view.cc index 501f032a38..159172c541 100644 --- a/shell/browser/ui/views/frameless_view.cc +++ b/shell/browser/ui/views/frameless_view.cc @@ -5,8 +5,6 @@ #include "shell/browser/ui/views/frameless_view.h" #include "shell/browser/native_window_views.h" -#include "shell/browser/ui/inspectable_web_contents_view.h" -#include "ui/aura/window.h" #include "ui/base/hit_test.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/views/widget/widget.h" diff --git a/shell/browser/ui/views/menu_delegate.h b/shell/browser/ui/views/menu_delegate.h index b7511688e8..036a124a5a 100644 --- a/shell/browser/ui/views/menu_delegate.h +++ b/shell/browser/ui/views/menu_delegate.h @@ -12,6 +12,10 @@ #include "shell/browser/ui/electron_menu_model.h" #include "ui/views/controls/menu/menu_delegate.h" +namespace gfx { +class FontList; +} // namespace gfx + namespace views { class MenuRunner; class Button; diff --git a/shell/browser/ui/views/opaque_frame_view.cc b/shell/browser/ui/views/opaque_frame_view.cc index 1dc0c4f8dc..f6b379ca6f 100644 --- a/shell/browser/ui/views/opaque_frame_view.cc +++ b/shell/browser/ui/views/opaque_frame_view.cc @@ -9,13 +9,12 @@ #include "chrome/grit/generated_resources.h" #include "components/strings/grit/components_strings.h" #include "shell/browser/native_window_views.h" -#include "shell/browser/ui/inspectable_web_contents_view.h" #include "shell/browser/ui/views/caption_button_placeholder_container.h" -#include "ui/aura/window.h" #include "ui/base/hit_test.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/compositor/layer.h" +#include "ui/gfx/font_list.h" #include "ui/linux/linux_ui.h" #include "ui/views/background.h" #include "ui/views/widget/widget.h" diff --git a/shell/browser/ui/views/opaque_frame_view.h b/shell/browser/ui/views/opaque_frame_view.h index af5f8eb8b5..dae79d03f4 100644 --- a/shell/browser/ui/views/opaque_frame_view.h +++ b/shell/browser/ui/views/opaque_frame_view.h @@ -5,14 +5,12 @@ #ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_OPAQUE_FRAME_VIEW_H_ #define ELECTRON_SHELL_BROWSER_UI_VIEWS_OPAQUE_FRAME_VIEW_H_ -#include +#include #include "base/memory/raw_ptr.h" #include "chrome/browser/ui/view_ids.h" #include "shell/browser/ui/views/frameless_view.h" #include "ui/base/metadata/metadata_header_macros.h" -#include "ui/gfx/font_list.h" -#include "ui/linux/nav_button_provider.h" #include "ui/linux/window_button_order_observer.h" #include "ui/views/controls/button/button.h" #include "ui/views/window/caption_button_types.h" @@ -23,6 +21,8 @@ class CaptionButtonPlaceholderContainer; namespace electron { +class NativeWindowViews; + class OpaqueFrameView : public FramelessView { METADATA_HEADER(OpaqueFrameView, FramelessView) diff --git a/shell/browser/ui/views/root_view.h b/shell/browser/ui/views/root_view.h index 22d92aea19..ac93b030ec 100644 --- a/shell/browser/ui/views/root_view.h +++ b/shell/browser/ui/views/root_view.h @@ -9,7 +9,6 @@ #include "base/memory/raw_ref.h" #include "shell/browser/ui/accelerator_util.h" -#include "ui/gfx/geometry/insets.h" #include "ui/views/view.h" #include "ui/views/view_tracker.h" diff --git a/shell/browser/ui/views/submenu_button.cc b/shell/browser/ui/views/submenu_button.cc index 9ff4a96038..730cccf1de 100644 --- a/shell/browser/ui/views/submenu_button.cc +++ b/shell/browser/ui/views/submenu_button.cc @@ -10,6 +10,7 @@ #include "ui/gfx/color_utils.h" #include "ui/gfx/text_utils.h" #include "ui/views/animation/flood_fill_ink_drop_ripple.h" +#include "ui/views/animation/ink_drop_highlight.h" #include "ui/views/animation/ink_drop_host.h" #include "ui/views/animation/ink_drop_impl.h" #include "ui/views/controls/button/label_button_border.h" diff --git a/shell/browser/ui/views/submenu_button.h b/shell/browser/ui/views/submenu_button.h index 260c795bc6..63e4dc8de7 100644 --- a/shell/browser/ui/views/submenu_button.h +++ b/shell/browser/ui/views/submenu_button.h @@ -7,12 +7,14 @@ #include -#include "ui/accessibility/ax_node_data.h" #include "ui/base/metadata/metadata_header_macros.h" #include "ui/base/metadata/metadata_impl_macros.h" -#include "ui/views/animation/ink_drop_highlight.h" #include "ui/views/controls/button/menu_button.h" +namespace ui { +struct AXNodeData; +} + namespace electron { // Special button that used by menu bar to show submenus. diff --git a/shell/browser/ui/views/win_caption_button.cc b/shell/browser/ui/views/win_caption_button.cc index 6320a60c65..63b69f42e7 100644 --- a/shell/browser/ui/views/win_caption_button.cc +++ b/shell/browser/ui/views/win_caption_button.cc @@ -12,6 +12,7 @@ #include "base/numerics/safe_conversions.h" #include "base/win/windows_version.h" #include "chrome/grit/theme_resources.h" +#include "shell/browser/native_window_views.h" #include "shell/browser/ui/views/win_frame_view.h" #include "shell/common/color_util.h" #include "ui/base/metadata/metadata_impl_macros.h" diff --git a/shell/browser/ui/views/win_caption_button_container.cc b/shell/browser/ui/views/win_caption_button_container.cc index 7d55af42f9..d98af95380 100644 --- a/shell/browser/ui/views/win_caption_button_container.cc +++ b/shell/browser/ui/views/win_caption_button_container.cc @@ -10,6 +10,10 @@ #include #include +#include +#include + +#include "shell/browser/native_window_views.h" #include "shell/browser/ui/views/win_caption_button.h" #include "shell/browser/ui/views/win_frame_view.h" #include "ui/base/l10n/l10n_util.h" diff --git a/shell/browser/ui/views/win_frame_view.cc b/shell/browser/ui/views/win_frame_view.cc index 56d7f9b017..75b7794462 100644 --- a/shell/browser/ui/views/win_frame_view.cc +++ b/shell/browser/ui/views/win_frame_view.cc @@ -12,7 +12,6 @@ #include #include -#include "base/win/windows_version.h" #include "shell/browser/native_window_views.h" #include "shell/browser/ui/views/win_caption_button_container.h" #include "ui/base/metadata/metadata_impl_macros.h" diff --git a/shell/browser/ui/views/win_frame_view.h b/shell/browser/ui/views/win_frame_view.h index 34252dfa0e..4441c26ea1 100644 --- a/shell/browser/ui/views/win_frame_view.h +++ b/shell/browser/ui/views/win_frame_view.h @@ -10,7 +10,6 @@ #ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_WIN_FRAME_VIEW_H_ #define ELECTRON_SHELL_BROWSER_UI_VIEWS_WIN_FRAME_VIEW_H_ -#include "shell/browser/native_window_views.h" #include "shell/browser/ui/views/frameless_view.h" #include "shell/browser/ui/views/win_caption_button.h" #include "shell/browser/ui/views/win_caption_button_container.h" @@ -18,6 +17,8 @@ namespace electron { +class NativeWindowViews; + class WinFrameView : public FramelessView { METADATA_HEADER(WinFrameView, FramelessView) diff --git a/shell/browser/ui/views/win_icon_painter.cc b/shell/browser/ui/views/win_icon_painter.cc index d50c0f1396..798e02d04b 100644 --- a/shell/browser/ui/views/win_icon_painter.cc +++ b/shell/browser/ui/views/win_icon_painter.cc @@ -8,10 +8,7 @@ #include "cc/paint/paint_flags.h" #include "third_party/skia/include/core/SkPath.h" #include "ui/gfx/canvas.h" -#include "ui/gfx/geometry/rect_conversions.h" #include "ui/gfx/geometry/rrect_f.h" -#include "ui/gfx/geometry/skia_conversions.h" -#include "ui/gfx/scoped_canvas.h" namespace { diff --git a/shell/browser/ui/webui/accessibility_ui.cc b/shell/browser/ui/webui/accessibility_ui.cc index fcf9a7fea6..f21d50ee13 100644 --- a/shell/browser/ui/webui/accessibility_ui.cc +++ b/shell/browser/ui/webui/accessibility_ui.cc @@ -5,7 +5,6 @@ #include "shell/browser/ui/webui/accessibility_ui.h" #include -#include #include #include #include @@ -17,7 +16,6 @@ #include "base/strings/string_split.h" #include "base/strings/utf_string_conversions.h" #include "base/values.h" -#include "build/build_config.h" #include "chrome/common/pref_names.h" #include "chrome/common/webui_url_constants.h" #include "chrome/grit/accessibility_resources.h" // nogncheck diff --git a/shell/browser/ui/win/electron_desktop_native_widget_aura.cc b/shell/browser/ui/win/electron_desktop_native_widget_aura.cc index fef641a50a..044d0941f1 100644 --- a/shell/browser/ui/win/electron_desktop_native_widget_aura.cc +++ b/shell/browser/ui/win/electron_desktop_native_widget_aura.cc @@ -6,6 +6,7 @@ #include +#include "shell/browser/native_window_views.h" #include "shell/browser/ui/win/electron_desktop_window_tree_host_win.h" #include "ui/views/corewm/tooltip_controller.h" #include "ui/wm/public/tooltip_client.h" diff --git a/shell/browser/ui/win/electron_desktop_native_widget_aura.h b/shell/browser/ui/win/electron_desktop_native_widget_aura.h index 2279a26d40..b1424990ba 100644 --- a/shell/browser/ui/win/electron_desktop_native_widget_aura.h +++ b/shell/browser/ui/win/electron_desktop_native_widget_aura.h @@ -5,7 +5,6 @@ #ifndef ELECTRON_SHELL_BROWSER_UI_WIN_ELECTRON_DESKTOP_NATIVE_WIDGET_AURA_H_ #define ELECTRON_SHELL_BROWSER_UI_WIN_ELECTRON_DESKTOP_NATIVE_WIDGET_AURA_H_ -#include "shell/browser/native_window_views.h" #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" namespace views { @@ -14,6 +13,8 @@ class DesktopWindowTreeHost; namespace electron { +class NativeWindowViews; + class ElectronDesktopNativeWidgetAura : public views::DesktopNativeWidgetAura { public: explicit ElectronDesktopNativeWidgetAura( diff --git a/shell/browser/ui/win/electron_desktop_window_tree_host_win.cc b/shell/browser/ui/win/electron_desktop_window_tree_host_win.cc index 9ec2588c70..48d6894d90 100644 --- a/shell/browser/ui/win/electron_desktop_window_tree_host_win.cc +++ b/shell/browser/ui/win/electron_desktop_window_tree_host_win.cc @@ -4,14 +4,12 @@ #include "shell/browser/ui/win/electron_desktop_window_tree_host_win.h" -#include - #include "base/win/windows_version.h" #include "electron/buildflags/buildflags.h" +#include "shell/browser/native_window_views.h" #include "shell/browser/ui/views/win_frame_view.h" #include "shell/browser/win/dark_mode.h" #include "ui/base/win/hwnd_metrics.h" -#include "ui/base/win/shell.h" namespace electron { diff --git a/shell/browser/ui/win/electron_desktop_window_tree_host_win.h b/shell/browser/ui/win/electron_desktop_window_tree_host_win.h index 9c3fcdad9b..d654431b66 100644 --- a/shell/browser/ui/win/electron_desktop_window_tree_host_win.h +++ b/shell/browser/ui/win/electron_desktop_window_tree_host_win.h @@ -9,11 +9,12 @@ #include -#include "shell/browser/native_window_views.h" #include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h" namespace electron { +class NativeWindowViews; + class ElectronDesktopWindowTreeHostWin : public views::DesktopWindowTreeHostWin, public ::ui::NativeThemeObserver { public: diff --git a/shell/browser/ui/win/notify_icon.cc b/shell/browser/ui/win/notify_icon.cc index 1f06d34817..6666ea4447 100644 --- a/shell/browser/ui/win/notify_icon.cc +++ b/shell/browser/ui/win/notify_icon.cc @@ -9,14 +9,11 @@ #include "base/logging.h" #include "base/strings/string_util_win.h" #include "base/strings/utf_string_conversions.h" -#include "base/win/windows_version.h" #include "shell/browser/ui/win/notify_icon_host.h" -#include "third_party/skia/include/core/SkBitmap.h" #include "ui/display/screen.h" #include "ui/display/win/screen_win.h" #include "ui/gfx/geometry/point.h" #include "ui/gfx/geometry/rect.h" -#include "ui/gfx/image/image.h" #include "ui/views/controls/menu/menu_runner.h" namespace { diff --git a/shell/browser/ui/win/taskbar_host.h b/shell/browser/ui/win/taskbar_host.h index 0134abfb07..9db58388d1 100644 --- a/shell/browser/ui/win/taskbar_host.h +++ b/shell/browser/ui/win/taskbar_host.h @@ -12,7 +12,6 @@ #include #include -#include "base/functional/callback.h" #include "shell/browser/native_window.h" #include "ui/gfx/image/image.h" diff --git a/shell/browser/usb/electron_usb_delegate.cc b/shell/browser/usb/electron_usb_delegate.cc index 4e15d1954a..22444f2b10 100644 --- a/shell/browser/usb/electron_usb_delegate.cc +++ b/shell/browser/usb/electron_usb_delegate.cc @@ -15,6 +15,7 @@ #include "content/public/browser/web_contents.h" #include "electron/buildflags/buildflags.h" #include "services/device/public/mojom/usb_enumeration_options.mojom.h" +#include "shell/browser/electron_browser_context.h" #include "shell/browser/electron_permission_manager.h" #include "shell/browser/usb/usb_chooser_context.h" #include "shell/browser/usb/usb_chooser_context_factory.h" diff --git a/shell/browser/usb/usb_chooser_context.cc b/shell/browser/usb/usb_chooser_context.cc index 40577f067f..0a18e593c3 100644 --- a/shell/browser/usb/usb_chooser_context.cc +++ b/shell/browser/usb/usb_chooser_context.cc @@ -12,12 +12,12 @@ #include "base/strings/string_piece.h" #include "base/task/sequenced_task_runner.h" #include "base/values.h" -#include "build/build_config.h" #include "components/content_settings/core/common/content_settings.h" #include "content/public/browser/device_service.h" #include "services/device/public/cpp/usb/usb_ids.h" #include "services/device/public/mojom/usb_device.mojom.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" diff --git a/shell/browser/usb/usb_chooser_context.h b/shell/browser/usb/usb_chooser_context.h index a9c1d07a5c..c4dd074f9a 100644 --- a/shell/browser/usb/usb_chooser_context.h +++ b/shell/browser/usb/usb_chooser_context.h @@ -14,7 +14,6 @@ #include "base/memory/raw_ptr.h" #include "base/observer_list.h" #include "base/values.h" -#include "build/build_config.h" #include "components/keyed_service/core/keyed_service.h" #include "mojo/public/cpp/bindings/associated_receiver.h" #include "mojo/public/cpp/bindings/pending_receiver.h" @@ -22,11 +21,12 @@ #include "mojo/public/cpp/bindings/remote.h" #include "services/device/public/mojom/usb_manager.mojom.h" #include "services/device/public/mojom/usb_manager_client.mojom.h" -#include "shell/browser/electron_browser_context.h" #include "url/origin.h" namespace electron { +class ElectronBrowserContext; + class UsbChooserContext : public KeyedService, public device::mojom::UsbDeviceManagerClient { public: diff --git a/shell/browser/usb/usb_chooser_controller.cc b/shell/browser/usb/usb_chooser_controller.cc index d4366062e9..5f92eefcb7 100644 --- a/shell/browser/usb/usb_chooser_controller.cc +++ b/shell/browser/usb/usb_chooser_controller.cc @@ -9,13 +9,13 @@ #include "base/functional/bind.h" #include "base/ranges/algorithm.h" -#include "build/build_config.h" #include "components/strings/grit/components_strings.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/web_contents.h" #include "gin/data_object_builder.h" #include "services/device/public/cpp/usb/usb_utils.h" #include "services/device/public/mojom/usb_enumeration_options.mojom.h" +#include "shell/browser/api/electron_api_session.h" #include "shell/browser/javascript_environment.h" #include "shell/browser/usb/usb_chooser_context_factory.h" #include "shell/common/gin_converters/callback_converter.h" diff --git a/shell/browser/usb/usb_chooser_controller.h b/shell/browser/usb/usb_chooser_controller.h index c04b3e266a..7abbddaff0 100644 --- a/shell/browser/usb/usb_chooser_controller.h +++ b/shell/browser/usb/usb_chooser_controller.h @@ -12,7 +12,6 @@ #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_observer.h" #include "services/device/public/mojom/usb_device.mojom.h" -#include "shell/browser/api/electron_api_session.h" #include "shell/browser/usb/electron_usb_delegate.h" #include "shell/browser/usb/usb_chooser_context.h" #include "third_party/blink/public/mojom/usb/web_usb_service.mojom.h" @@ -22,7 +21,14 @@ namespace content { class RenderFrameHost; } +namespace gin { +class Arguments; +} + namespace electron { +namespace api { +class Session; +} // UsbChooserController creates a chooser for WebUSB. class UsbChooserController final : private UsbChooserContext::DeviceObserver, diff --git a/shell/browser/web_contents_permission_helper.cc b/shell/browser/web_contents_permission_helper.cc index f97385aaa1..40f77feed1 100644 --- a/shell/browser/web_contents_permission_helper.cc +++ b/shell/browser/web_contents_permission_helper.cc @@ -12,6 +12,7 @@ #include "content/public/browser/browser_context.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/web_contents_user_data.h" +#include "shell/browser/electron_browser_context.h" #include "shell/browser/electron_permission_manager.h" #include "shell/browser/media/media_capture_devices_dispatcher.h" diff --git a/shell/browser/web_contents_preferences.cc b/shell/browser/web_contents_preferences.cc index 1704344be5..19c81d1437 100644 --- a/shell/browser/web_contents_preferences.cc +++ b/shell/browser/web_contents_preferences.cc @@ -14,7 +14,6 @@ #include "base/containers/fixed_flat_map.h" #include "base/memory/ptr_util.h" #include "cc/base/switches.h" -#include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/web_contents_user_data.h" #include "content/public/common/content_switches.h" diff --git a/shell/common/api/electron_api_clipboard.cc b/shell/common/api/electron_api_clipboard.cc index af03e7e99a..7d741cb70c 100644 --- a/shell/common/api/electron_api_clipboard.cc +++ b/shell/common/api/electron_api_clipboard.cc @@ -14,8 +14,6 @@ #include "shell/common/gin_helper/dictionary.h" #include "shell/common/node_includes.h" #include "third_party/skia/include/core/SkBitmap.h" -#include "third_party/skia/include/core/SkImageInfo.h" -#include "third_party/skia/include/core/SkPixmap.h" #include "ui/base/clipboard/clipboard_format_type.h" #include "ui/base/clipboard/file_info.h" #include "ui/base/clipboard/scoped_clipboard_writer.h" diff --git a/shell/common/api/electron_bindings.cc b/shell/common/api/electron_bindings.cc index 127be2e0e7..2d9d7f72ce 100644 --- a/shell/common/api/electron_bindings.cc +++ b/shell/common/api/electron_bindings.cc @@ -10,6 +10,7 @@ #include #include "base/containers/contains.h" +#include "base/files/file.h" #include "base/process/process.h" #include "base/process/process_handle.h" #include "base/system/sys_info.h" diff --git a/shell/common/electron_constants.h b/shell/common/electron_constants.h index ed40d73b23..ad2b77aa0d 100644 --- a/shell/common/electron_constants.h +++ b/shell/common/electron_constants.h @@ -6,7 +6,6 @@ #define ELECTRON_SHELL_COMMON_ELECTRON_CONSTANTS_H_ #include "base/files/file_path.h" -#include "build/build_config.h" #include "electron/buildflags/buildflags.h" namespace electron { diff --git a/shell/common/language_util_win.cc b/shell/common/language_util_win.cc index 183d70a999..127d7f2817 100644 --- a/shell/common/language_util_win.cc +++ b/shell/common/language_util_win.cc @@ -12,7 +12,6 @@ #include "base/win/core_winrt_util.h" #include "base/win/i18n.h" #include "base/win/win_util.h" -#include "base/win/windows_version.h" namespace electron { diff --git a/shell/common/logging.cc b/shell/common/logging.cc index b9d58e187b..47e0d93e2c 100644 --- a/shell/common/logging.cc +++ b/shell/common/logging.cc @@ -16,7 +16,6 @@ #include "base/strings/string_number_conversions.h" #include "chrome/common/chrome_paths.h" #include "content/public/common/content_switches.h" -#include "shell/common/electron_paths.h" namespace logging { diff --git a/shell/common/node_bindings.h b/shell/common/node_bindings.h index 93363117df..03813e793b 100644 --- a/shell/common/node_bindings.h +++ b/shell/common/node_bindings.h @@ -11,7 +11,6 @@ #include #include -#include "base/files/file_path.h" #include "base/functional/callback.h" #include "base/memory/raw_ptr.h" #include "base/memory/raw_ptr_exclusion.h" diff --git a/shell/common/node_util.h b/shell/common/node_util.h index 7044abcac2..38f9d28b2b 100644 --- a/shell/common/node_util.h +++ b/shell/common/node_util.h @@ -7,7 +7,6 @@ #include -#include "build/build_config.h" #include "v8/include/v8.h" namespace node { diff --git a/shell/common/platform_util_mac.mm b/shell/common/platform_util_mac.mm index 811836dec6..49752dd4a2 100644 --- a/shell/common/platform_util_mac.mm +++ b/shell/common/platform_util_mac.mm @@ -16,7 +16,6 @@ #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/functional/bind.h" -#include "base/functional/callback.h" #include "base/logging.h" #include "base/mac/scoped_aedesc.h" #include "base/strings/sys_string_conversions.h" diff --git a/shell/common/platform_util_win.cc b/shell/common/platform_util_win.cc index 7afdb35ccd..369aa3dd92 100644 --- a/shell/common/platform_util_win.cc +++ b/shell/common/platform_util_win.cc @@ -29,7 +29,6 @@ #include "base/win/registry.h" #include "base/win/scoped_co_mem.h" #include "base/win/scoped_com_initializer.h" -#include "base/win/windows_version.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "shell/common/electron_paths.h" diff --git a/shell/renderer/api/electron_api_spell_check_client.h b/shell/renderer/api/electron_api_spell_check_client.h index 32ccf8014c..befd74e806 100644 --- a/shell/renderer/api/electron_api_spell_check_client.h +++ b/shell/renderer/api/electron_api_spell_check_client.h @@ -10,7 +10,6 @@ #include #include -#include "base/functional/callback.h" #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" #include "components/spellcheck/renderer/spellcheck_worditerator.h" diff --git a/shell/renderer/browser_exposed_renderer_interfaces.cc b/shell/renderer/browser_exposed_renderer_interfaces.cc index bc3ec52514..359548773c 100644 --- a/shell/renderer/browser_exposed_renderer_interfaces.cc +++ b/shell/renderer/browser_exposed_renderer_interfaces.cc @@ -8,7 +8,6 @@ #include "base/functional/bind.h" #include "base/task/sequenced_task_runner.h" -#include "build/build_config.h" #include "electron/buildflags/buildflags.h" #include "mojo/public/cpp/bindings/binder_map.h" #include "shell/renderer/renderer_client_base.h" diff --git a/shell/renderer/extensions/electron_extensions_renderer_api_provider.h b/shell/renderer/extensions/electron_extensions_renderer_api_provider.h index f4b4e4e2e6..b4af558359 100644 --- a/shell/renderer/extensions/electron_extensions_renderer_api_provider.h +++ b/shell/renderer/extensions/electron_extensions_renderer_api_provider.h @@ -5,8 +5,6 @@ #ifndef ELECTRON_SHELL_RENDERER_EXTENSIONS_ELECTRON_EXTENSIONS_RENDERER_API_PROVIDER_H_ #define ELECTRON_SHELL_RENDERER_EXTENSIONS_ELECTRON_EXTENSIONS_RENDERER_API_PROVIDER_H_ -#include - #include "extensions/renderer/extensions_renderer_api_provider.h" namespace electron { diff --git a/shell/renderer/pepper_helper.h b/shell/renderer/pepper_helper.h index 98c41b5a67..e8d01ffbb6 100644 --- a/shell/renderer/pepper_helper.h +++ b/shell/renderer/pepper_helper.h @@ -5,7 +5,6 @@ #ifndef ELECTRON_SHELL_RENDERER_PEPPER_HELPER_H_ #define ELECTRON_SHELL_RENDERER_PEPPER_HELPER_H_ -#include "base/component_export.h" #include "content/public/renderer/render_frame_observer.h" // This class listens for Pepper creation events from the RenderFrame and diff --git a/shell/renderer/renderer_client_base.cc b/shell/renderer/renderer_client_base.cc index c958c3fa22..4e84c276f2 100644 --- a/shell/renderer/renderer_client_base.cc +++ b/shell/renderer/renderer_client_base.cc @@ -20,7 +20,6 @@ #include "content/public/renderer/render_thread.h" #include "electron/buildflags/buildflags.h" #include "electron/fuses.h" -#include "media/base/key_systems_support_registration.h" #include "printing/buildflags/buildflags.h" #include "shell/browser/api/electron_api_protocol.h" #include "shell/common/api/electron_api_native_image.h" diff --git a/shell/renderer/renderer_client_base.h b/shell/renderer/renderer_client_base.h index 39753ddee5..1d5deeec3f 100644 --- a/shell/renderer/renderer_client_base.h +++ b/shell/renderer/renderer_client_base.h @@ -10,8 +10,6 @@ #include "content/public/renderer/content_renderer_client.h" #include "electron/buildflags/buildflags.h" -#include "media/base/key_systems_support_registration.h" -#include "printing/buildflags/buildflags.h" // In SHARED_INTERMEDIATE_DIR. #include "widevine_cdm_version.h" // NOLINT(build/include_directory) diff --git a/shell/services/node/parent_port.cc b/shell/services/node/parent_port.cc index 13d9433f30..e62b2076b2 100644 --- a/shell/services/node/parent_port.cc +++ b/shell/services/node/parent_port.cc @@ -9,7 +9,9 @@ #include "base/no_destructor.h" #include "gin/data_object_builder.h" #include "gin/handle.h" +#include "gin/object_template_builder.h" #include "shell/browser/api/message_port.h" +#include "shell/browser/javascript_environment.h" #include "shell/common/gin_helper/dictionary.h" #include "shell/common/gin_helper/event_emitter_caller.h" #include "shell/common/node_includes.h" diff --git a/shell/services/node/parent_port.h b/shell/services/node/parent_port.h index bb56886573..082d47a2ef 100644 --- a/shell/services/node/parent_port.h +++ b/shell/services/node/parent_port.h @@ -10,7 +10,7 @@ #include "gin/wrappable.h" #include "mojo/public/cpp/bindings/connector.h" #include "mojo/public/cpp/bindings/message.h" -#include "shell/browser/event_emitter_mixin.h" +#include "third_party/blink/public/common/messaging/message_port_descriptor.h" namespace v8 { template