diff --git a/shell/app/uv_task_runner.cc b/shell/app/uv_task_runner.cc index 905c64549f..f98ddce873 100644 --- a/shell/app/uv_task_runner.cc +++ b/shell/app/uv_task_runner.cc @@ -4,9 +4,9 @@ #include -#include "shell/app/uv_task_runner.h" - +#include "base/location.h" #include "base/stl_util.h" +#include "shell/app/uv_task_runner.h" namespace electron { diff --git a/shell/app/uv_task_runner.h b/shell/app/uv_task_runner.h index cd7b55005c..621dd08965 100644 --- a/shell/app/uv_task_runner.h +++ b/shell/app/uv_task_runner.h @@ -8,10 +8,13 @@ #include #include "base/callback.h" -#include "base/location.h" #include "base/single_thread_task_runner.h" #include "uv.h" // NOLINT(build/include_directory) +namespace base { +class Location; +} + namespace electron { // TaskRunner implementation that posts tasks into libuv's default loop. diff --git a/shell/browser/api/electron_api_browser_view.h b/shell/browser/api/electron_api_browser_view.h index 9ceba81c01..1f4e9418be 100644 --- a/shell/browser/api/electron_api_browser_view.h +++ b/shell/browser/api/electron_api_browser_view.h @@ -29,8 +29,6 @@ class Dictionary; namespace electron { -class NativeBrowserView; - namespace api { class WebContents; diff --git a/shell/browser/api/electron_api_cookies.h b/shell/browser/api/electron_api_cookies.h index 090399c178..087d723e44 100644 --- a/shell/browser/api/electron_api_cookies.h +++ b/shell/browser/api/electron_api_cookies.h @@ -23,10 +23,6 @@ namespace gin_helper { class Dictionary; } -namespace net { -class URLRequestContextGetter; -} - namespace electron { class ElectronBrowserContext; diff --git a/shell/browser/api/electron_api_download_item.cc b/shell/browser/api/electron_api_download_item.cc index e285e962a1..6943d8effc 100644 --- a/shell/browser/api/electron_api_download_item.cc +++ b/shell/browser/api/electron_api_download_item.cc @@ -16,6 +16,7 @@ #include "shell/common/gin_helper/dictionary.h" #include "shell/common/gin_helper/object_template_builder.h" #include "shell/common/node_includes.h" +#include "url/gurl.h" namespace gin { diff --git a/shell/browser/api/electron_api_download_item.h b/shell/browser/api/electron_api_download_item.h index ce12dfbdbc..bb67279ac9 100644 --- a/shell/browser/api/electron_api_download_item.h +++ b/shell/browser/api/electron_api_download_item.h @@ -15,7 +15,8 @@ #include "shell/browser/event_emitter_mixin.h" #include "shell/browser/ui/file_dialog.h" #include "shell/common/gin_helper/pinnable.h" -#include "url/gurl.h" + +class GURL; namespace electron { diff --git a/shell/browser/api/electron_api_protocol.cc b/shell/browser/api/electron_api_protocol.cc index 164615ffcd..70bbcd769a 100644 --- a/shell/browser/api/electron_api_protocol.cc +++ b/shell/browser/api/electron_api_protocol.cc @@ -19,6 +19,7 @@ #include "shell/common/gin_helper/dictionary.h" #include "shell/common/gin_helper/object_template_builder.h" #include "shell/common/gin_helper/promise.h" +#include "shell/common/node_includes.h" #include "shell/common/options_switches.h" #include "shell/common/process_util.h" #include "url/url_util.h" diff --git a/shell/browser/api/electron_api_system_preferences_mac.mm b/shell/browser/api/electron_api_system_preferences_mac.mm index 9281837fc0..224cd7966d 100644 --- a/shell/browser/api/electron_api_system_preferences_mac.mm +++ b/shell/browser/api/electron_api_system_preferences_mac.mm @@ -29,6 +29,7 @@ #include "shell/common/color_util.h" #include "shell/common/gin_converters/gurl_converter.h" #include "shell/common/gin_converters/value_converter.h" +#include "shell/common/node_includes.h" #include "shell/common/process_util.h" #include "skia/ext/skia_utils_mac.h" #include "ui/native_theme/native_theme.h" diff --git a/shell/browser/api/electron_api_tray.h b/shell/browser/api/electron_api_tray.h index f3ce64ae5b..bf6f9100e3 100644 --- a/shell/browser/api/electron_api_tray.h +++ b/shell/browser/api/electron_api_tray.h @@ -33,7 +33,6 @@ namespace electron { namespace api { class Menu; -class NativeImage; class Tray : public gin::Wrappable, public gin_helper::EventEmitterMixin, diff --git a/shell/browser/api/electron_api_web_contents_view.h b/shell/browser/api/electron_api_web_contents_view.h index 26e2c60256..86c65c22c2 100644 --- a/shell/browser/api/electron_api_web_contents_view.h +++ b/shell/browser/api/electron_api_web_contents_view.h @@ -14,8 +14,6 @@ class Dictionary; namespace electron { -class InspectableWebContents; - namespace api { class WebContents; diff --git a/shell/browser/api/electron_api_web_frame_main.h b/shell/browser/api/electron_api_web_frame_main.h index 37be0a2eeb..37c3ba3d70 100644 --- a/shell/browser/api/electron_api_web_frame_main.h +++ b/shell/browser/api/electron_api_web_frame_main.h @@ -27,10 +27,6 @@ namespace gin { class Arguments; } -namespace gin_helper { -class Dictionary; -} - namespace electron { namespace api { diff --git a/shell/browser/api/event.h b/shell/browser/api/event.h index d10e9b47a3..5cc7c47750 100644 --- a/shell/browser/api/event.h +++ b/shell/browser/api/event.h @@ -9,10 +9,6 @@ #include "gin/handle.h" #include "gin/wrappable.h" -namespace IPC { -class Message; -} - namespace gin_helper { class Event : public gin::Wrappable { diff --git a/shell/browser/api/frame_subscriber.h b/shell/browser/api/frame_subscriber.h index 486cee4545..031c3a591b 100644 --- a/shell/browser/api/frame_subscriber.h +++ b/shell/browser/api/frame_subscriber.h @@ -18,7 +18,8 @@ namespace gfx { class Image; -} +class Rect; +} // namespace gfx namespace electron { diff --git a/shell/browser/bluetooth/electron_bluetooth_delegate.h b/shell/browser/bluetooth/electron_bluetooth_delegate.h index 883eef1100..96a6103a16 100644 --- a/shell/browser/bluetooth/electron_bluetooth_delegate.h +++ b/shell/browser/bluetooth/electron_bluetooth_delegate.h @@ -17,11 +17,11 @@ namespace blink { class WebBluetoothDeviceId; -} // namespace blink +} namespace content { class RenderFrameHost; -} // namespace content +} namespace device { class BluetoothDevice; diff --git a/shell/browser/browser.h b/shell/browser/browser.h index 682f5b1b77..3b57855255 100755 --- a/shell/browser/browser.h +++ b/shell/browser/browser.h @@ -33,10 +33,6 @@ namespace base { class FilePath; } -namespace gfx { -class Image; -} - namespace gin_helper { class Arguments; } diff --git a/shell/browser/browser_process_impl.h b/shell/browser/browser_process_impl.h index ac42e84d45..1f9ad3b97d 100644 --- a/shell/browser/browser_process_impl.h +++ b/shell/browser/browser_process_impl.h @@ -26,7 +26,7 @@ namespace printing { class PrintJobManager; } -// Empty definition for std::unique_ptr +// Empty definition for std::unique_ptr, rather than a forward declaration class BackgroundModeManager {}; // NOT THREAD SAFE, call only from the main thread. diff --git a/shell/browser/electron_browser_context.h b/shell/browser/electron_browser_context.h index 87052a37c7..4cb737bcdf 100644 --- a/shell/browser/electron_browser_context.h +++ b/shell/browser/electron_browser_context.h @@ -18,7 +18,6 @@ #include "services/network/public/mojom/url_loader_factory.mojom.h" #include "shell/browser/media/media_device_id_salt.h" -class PrefRegistrySimple; class PrefService; class ValueMapPrefStore; @@ -43,7 +42,6 @@ class ElectronDownloadManagerDelegate; class ElectronPermissionManager; class CookieChangeNotifier; class ResolveProxyHelper; -class SpecialStoragePolicy; class WebViewManager; class ProtocolRegistry; diff --git a/shell/browser/electron_browser_handler_impl.h b/shell/browser/electron_browser_handler_impl.h index 06a5c0a660..fc2eab200d 100644 --- a/shell/browser/electron_browser_handler_impl.h +++ b/shell/browser/electron_browser_handler_impl.h @@ -16,7 +16,7 @@ namespace content { class RenderFrameHost; -} // namespace content +} namespace electron { class ElectronBrowserHandlerImpl : public mojom::ElectronBrowser, diff --git a/shell/browser/electron_browser_main_parts.cc b/shell/browser/electron_browser_main_parts.cc index be430e8783..5647a75fb6 100644 --- a/shell/browser/electron_browser_main_parts.cc +++ b/shell/browser/electron_browser_main_parts.cc @@ -11,6 +11,7 @@ #include "base/base_switches.h" #include "base/command_line.h" #include "base/feature_list.h" +#include "base/metrics/field_trial.h" #include "base/path_service.h" #include "base/run_loop.h" #include "base/strings/string_number_conversions.h" diff --git a/shell/browser/electron_browser_main_parts.h b/shell/browser/electron_browser_main_parts.h index 1da21556fb..8ad163a3ea 100644 --- a/shell/browser/electron_browser_main_parts.h +++ b/shell/browser/electron_browser_main_parts.h @@ -9,7 +9,6 @@ #include #include "base/callback.h" -#include "base/metrics/field_trial.h" #include "base/timer/timer.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_main_parts.h" @@ -20,9 +19,13 @@ #include "third_party/abseil-cpp/absl/types/optional.h" #include "ui/views/layout/layout_provider.h" -class BrowserProcess; +class BrowserProcessImpl; class IconManager; +namespace base { +class FieldTrialList; +} + #if defined(USE_AURA) namespace wm { class WMState; @@ -41,17 +44,15 @@ class GtkUiPlatform; namespace device { class GeolocationManager; -} // namespace device +} namespace electron { -class ElectronBrowserContext; class Browser; class ElectronBindings; class JavascriptEnvironment; class NodeBindings; class NodeEnvironment; -class BridgeTaskRunner; #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) class ElectronExtensionsClient; diff --git a/shell/browser/electron_browser_main_parts_posix.cc b/shell/browser/electron_browser_main_parts_posix.cc index a8a9cf8db1..1618cbdcbd 100644 --- a/shell/browser/electron_browser_main_parts_posix.cc +++ b/shell/browser/electron_browser_main_parts_posix.cc @@ -13,6 +13,7 @@ #include #include +#include "base/debug/leak_annotations.h" #include "base/posix/eintr_wrapper.h" #include "base/task/post_task.h" #include "content/public/browser/browser_task_traits.h" diff --git a/shell/browser/electron_javascript_dialog_manager.h b/shell/browser/electron_javascript_dialog_manager.h index 4c5135c9ed..e36778696b 100644 --- a/shell/browser/electron_javascript_dialog_manager.h +++ b/shell/browser/electron_javascript_dialog_manager.h @@ -10,12 +10,12 @@ #include "content/public/browser/javascript_dialog_manager.h" -namespace electron { - -namespace api { +namespace content { class WebContents; } +namespace electron { + class ElectronJavaScriptDialogManager : public content::JavaScriptDialogManager { public: diff --git a/shell/browser/electron_permission_manager.cc b/shell/browser/electron_permission_manager.cc index c10f37b029..78dd47fa2f 100644 --- a/shell/browser/electron_permission_manager.cc +++ b/shell/browser/electron_permission_manager.cc @@ -8,6 +8,7 @@ #include #include +#include "base/values.h" #include "content/public/browser/child_process_security_policy.h" #include "content/public/browser/global_routing_id.h" #include "content/public/browser/permission_controller.h" diff --git a/shell/browser/electron_permission_manager.h b/shell/browser/electron_permission_manager.h index f1bab317cb..c4d8b5bd7e 100644 --- a/shell/browser/electron_permission_manager.h +++ b/shell/browser/electron_permission_manager.h @@ -10,9 +10,13 @@ #include "base/callback.h" #include "base/containers/id_map.h" -#include "base/values.h" #include "content/public/browser/permission_controller_delegate.h" +namespace base { +class DictionaryValue; +class Value; +} // namespace base + namespace content { class WebContents; } diff --git a/shell/browser/electron_quota_permission_context.cc b/shell/browser/electron_quota_permission_context.cc index 7c0f98d219..cdb79b5331 100644 --- a/shell/browser/electron_quota_permission_context.cc +++ b/shell/browser/electron_quota_permission_context.cc @@ -6,6 +6,8 @@ #include +#include "content/public/common/storage_quota_params.h" + namespace electron { ElectronQuotaPermissionContext::ElectronQuotaPermissionContext() = default; diff --git a/shell/browser/electron_quota_permission_context.h b/shell/browser/electron_quota_permission_context.h index 5312b968d4..7418718cc8 100644 --- a/shell/browser/electron_quota_permission_context.h +++ b/shell/browser/electron_quota_permission_context.h @@ -6,7 +6,10 @@ #define SHELL_BROWSER_ELECTRON_QUOTA_PERMISSION_CONTEXT_H_ #include "content/public/browser/quota_permission_context.h" -#include "content/public/common/storage_quota_params.h" + +namespace content { +struct StorageQuotaParams; +} namespace electron { diff --git a/shell/browser/electron_web_ui_controller_factory.cc b/shell/browser/electron_web_ui_controller_factory.cc index c6e159ce7c..b28807c9dd 100644 --- a/shell/browser/electron_web_ui_controller_factory.cc +++ b/shell/browser/electron_web_ui_controller_factory.cc @@ -6,6 +6,7 @@ #include "chrome/common/webui_url_constants.h" #include "content/public/browser/web_contents.h" +#include "content/public/browser/web_ui_controller.h" #include "electron/buildflags/buildflags.h" #include "shell/browser/ui/devtools_ui.h" #include "shell/browser/ui/webui/accessibility_ui.h" diff --git a/shell/browser/electron_web_ui_controller_factory.h b/shell/browser/electron_web_ui_controller_factory.h index d001f93342..ea1e245c72 100644 --- a/shell/browser/electron_web_ui_controller_factory.h +++ b/shell/browser/electron_web_ui_controller_factory.h @@ -9,9 +9,12 @@ #include "base/macros.h" #include "base/memory/singleton.h" -#include "content/public/browser/web_ui_controller.h" #include "content/public/browser/web_ui_controller_factory.h" +namespace content { +class WebUIController; +} + namespace electron { class ElectronWebUIControllerFactory : public content::WebUIControllerFactory { diff --git a/shell/browser/extensions/api/runtime/electron_runtime_api_delegate.h b/shell/browser/extensions/api/runtime/electron_runtime_api_delegate.h index 1ddc45e317..bce649e6f9 100644 --- a/shell/browser/extensions/api/runtime/electron_runtime_api_delegate.h +++ b/shell/browser/extensions/api/runtime/electron_runtime_api_delegate.h @@ -12,7 +12,7 @@ namespace content { class BrowserContext; -} // namespace content +} namespace extensions { diff --git a/shell/browser/extensions/api/tabs/tabs_api.cc b/shell/browser/extensions/api/tabs/tabs_api.cc index 60838cd889..4c56bcd33e 100644 --- a/shell/browser/extensions/api/tabs/tabs_api.cc +++ b/shell/browser/extensions/api/tabs/tabs_api.cc @@ -16,6 +16,7 @@ #include "shell/browser/web_contents_zoom_controller.h" #include "shell/common/extensions/api/tabs.h" #include "third_party/blink/public/common/page/page_zoom.h" +#include "url/gurl.h" using electron::WebContentsZoomController; diff --git a/shell/browser/extensions/api/tabs/tabs_api.h b/shell/browser/extensions/api/tabs/tabs_api.h index b8a424362b..fe3261fcfd 100644 --- a/shell/browser/extensions/api/tabs/tabs_api.h +++ b/shell/browser/extensions/api/tabs/tabs_api.h @@ -10,7 +10,8 @@ #include "extensions/browser/api/execute_code_function.h" #include "extensions/browser/extension_function.h" #include "extensions/common/extension_resource.h" -#include "url/gurl.h" + +class GURL; namespace extensions { diff --git a/shell/browser/extensions/electron_extension_loader.h b/shell/browser/extensions/electron_extension_loader.h index 49c6f63098..cc3ddfcacf 100644 --- a/shell/browser/extensions/electron_extension_loader.h +++ b/shell/browser/extensions/electron_extension_loader.h @@ -17,11 +17,11 @@ namespace base { class FilePath; -} // namespace base +} namespace content { class BrowserContext; -} // namespace content +} namespace extensions { diff --git a/shell/browser/native_window.cc b/shell/browser/native_window.cc index 435b007835..a39054cf42 100644 --- a/shell/browser/native_window.cc +++ b/shell/browser/native_window.cc @@ -10,6 +10,7 @@ #include "base/memory/ptr_util.h" #include "base/strings/utf_string_conversions.h" +#include "base/values.h" #include "shell/browser/browser.h" #include "shell/browser/window_list.h" #include "shell/common/color_util.h" diff --git a/shell/browser/native_window.h b/shell/browser/native_window.h index 1241d70f8c..cab20e57bb 100644 --- a/shell/browser/native_window.h +++ b/shell/browser/native_window.h @@ -13,7 +13,6 @@ #include "base/memory/weak_ptr.h" #include "base/observer_list.h" #include "base/supports_user_data.h" -#include "base/values.h" #include "content/public/browser/desktop_media_id.h" #include "content/public/browser/web_contents_user_data.h" #include "extensions/browser/app_window/size_constraints.h" @@ -21,7 +20,9 @@ #include "third_party/abseil-cpp/absl/types/optional.h" #include "ui/views/widget/widget_delegate.h" -class SkRegion; +namespace base { +class DictionaryValue; +} namespace content { struct NativeWebKeyboardEvent; @@ -31,7 +32,6 @@ namespace gfx { class Image; class Point; class Rect; -class RectF; enum class ResizeEdge; class Size; } // namespace gfx diff --git a/shell/browser/native_window_mac.mm b/shell/browser/native_window_mac.mm index f89b25bd9d..29cba7eaa0 100644 --- a/shell/browser/native_window_mac.mm +++ b/shell/browser/native_window_mac.mm @@ -38,6 +38,7 @@ #include "shell/browser/window_list.h" #include "shell/common/gin_converters/gfx_converter.h" #include "shell/common/gin_helper/dictionary.h" +#include "shell/common/node_includes.h" #include "shell/common/options_switches.h" #include "shell/common/process_util.h" #include "skia/ext/skia_utils_mac.h" diff --git a/shell/browser/native_window_observer.h b/shell/browser/native_window_observer.h index caa38e4ffa..ce7f337c3c 100644 --- a/shell/browser/native_window_observer.h +++ b/shell/browser/native_window_observer.h @@ -10,12 +10,13 @@ #include "base/observer_list_types.h" #include "base/values.h" #include "ui/base/window_open_disposition.h" -#include "url/gurl.h" #if defined(OS_WIN) #include #endif +class GURL; + namespace gfx { class Rect; enum class ResizeEdge; diff --git a/shell/browser/net/network_context_service_factory.h b/shell/browser/net/network_context_service_factory.h index 187aa25b0c..8d24457ed5 100644 --- a/shell/browser/net/network_context_service_factory.h +++ b/shell/browser/net/network_context_service_factory.h @@ -10,7 +10,7 @@ class KeyedService; -namespace contenet { +namespace content { class BrowserContext; } diff --git a/shell/browser/net/system_network_context_manager.h b/shell/browser/net/system_network_context_manager.h index 588977cac0..6d65e04ca1 100644 --- a/shell/browser/net/system_network_context_manager.h +++ b/shell/browser/net/system_network_context_manager.h @@ -16,10 +16,6 @@ #include "services/network/public/mojom/url_loader_factory.mojom.h" #include "third_party/abseil-cpp/absl/types/optional.h" -namespace net_log { -class NetExportFileWriter; -} - namespace electron { network::mojom::HttpAuthDynamicParamsPtr CreateHttpAuthDynamicParams(); } diff --git a/shell/browser/osr/osr_render_widget_host_view.h b/shell/browser/osr/osr_render_widget_host_view.h index 51eaa290ac..477c304787 100644 --- a/shell/browser/osr/osr_render_widget_host_view.h +++ b/shell/browser/osr/osr_render_widget_host_view.h @@ -43,7 +43,7 @@ namespace content { class CursorManager; -} // namespace content +} namespace electron { diff --git a/shell/browser/pref_store_delegate.cc b/shell/browser/pref_store_delegate.cc index 34141f0dca..57740077bc 100644 --- a/shell/browser/pref_store_delegate.cc +++ b/shell/browser/pref_store_delegate.cc @@ -6,6 +6,8 @@ #include +#include "components/prefs/persistent_pref_store.h" +#include "components/prefs/pref_store.h" #include "components/prefs/value_map_pref_store.h" #include "shell/browser/electron_browser_context.h" diff --git a/shell/browser/pref_store_delegate.h b/shell/browser/pref_store_delegate.h index 548696bcb7..22ab480d43 100644 --- a/shell/browser/pref_store_delegate.h +++ b/shell/browser/pref_store_delegate.h @@ -9,9 +9,13 @@ #include "base/macros.h" #include "base/memory/weak_ptr.h" -#include "components/prefs/persistent_pref_store.h" #include "components/prefs/pref_value_store.h" +class PersistentPrefStore; +class PrefNotifier; +class PrefRegistry; +class PrefStore; + namespace electron { class ElectronBrowserContext; diff --git a/shell/browser/protocol_registry.h b/shell/browser/protocol_registry.h index 3ea7e12744..f5a07863ec 100644 --- a/shell/browser/protocol_registry.h +++ b/shell/browser/protocol_registry.h @@ -12,7 +12,7 @@ namespace content { class BrowserContext; -} // namespace content +} namespace electron { diff --git a/shell/browser/serial/serial_chooser_controller.h b/shell/browser/serial/serial_chooser_controller.h index 85c3759082..545e5d8baf 100644 --- a/shell/browser/serial/serial_chooser_controller.h +++ b/shell/browser/serial/serial_chooser_controller.h @@ -21,7 +21,7 @@ namespace content { class RenderFrameHost; -} // namespace content +} namespace electron { diff --git a/shell/browser/session_preferences.cc b/shell/browser/session_preferences.cc index 2cdce00d2f..438940a2bf 100644 --- a/shell/browser/session_preferences.cc +++ b/shell/browser/session_preferences.cc @@ -6,6 +6,7 @@ #include "base/logging.h" #include "base/memory/ptr_util.h" +#include "content/public/browser/browser_context.h" namespace electron { diff --git a/shell/browser/session_preferences.h b/shell/browser/session_preferences.h index 958f4789d3..e02d92ee47 100644 --- a/shell/browser/session_preferences.h +++ b/shell/browser/session_preferences.h @@ -9,7 +9,10 @@ #include "base/files/file_path.h" #include "base/supports_user_data.h" -#include "content/public/browser/browser_context.h" + +namespace content { +class BrowserContext; +} namespace electron { diff --git a/shell/browser/ui/certificate_trust.h b/shell/browser/ui/certificate_trust.h index e7962b5de9..02bd8987be 100644 --- a/shell/browser/ui/certificate_trust.h +++ b/shell/browser/ui/certificate_trust.h @@ -14,7 +14,7 @@ namespace electron { class NativeWindow; -} // namespace electron +} namespace certificate_trust { diff --git a/shell/browser/ui/devtools_ui.h b/shell/browser/ui/devtools_ui.h index 1bbde643a8..8ec356e2ec 100644 --- a/shell/browser/ui/devtools_ui.h +++ b/shell/browser/ui/devtools_ui.h @@ -11,8 +11,6 @@ namespace electron { -class BrowserContext; - class DevToolsUI : public content::WebUIController { public: explicit DevToolsUI(content::BrowserContext* browser_context, diff --git a/shell/browser/ui/tray_icon_gtk.h b/shell/browser/ui/tray_icon_gtk.h index 41193af329..3ef9db953d 100644 --- a/shell/browser/ui/tray_icon_gtk.h +++ b/shell/browser/ui/tray_icon_gtk.h @@ -11,10 +11,6 @@ #include "shell/browser/ui/tray_icon.h" #include "ui/views/linux_ui/status_icon_linux.h" -namespace views { -class StatusIconLinux; -} - namespace electron { class TrayIconGtk : public TrayIcon, public views::StatusIconLinux::Delegate { diff --git a/shell/browser/web_contents_preferences.h b/shell/browser/web_contents_preferences.h index 15eda7396a..4e28252387 100644 --- a/shell/browser/web_contents_preferences.h +++ b/shell/browser/web_contents_preferences.h @@ -15,10 +15,6 @@ namespace base { class CommandLine; } -namespace content { -struct WebPreferences; -} - namespace gin_helper { class Dictionary; } diff --git a/shell/browser/zoom_level_delegate.cc b/shell/browser/zoom_level_delegate.cc index c446b270aa..a2c340a212 100644 --- a/shell/browser/zoom_level_delegate.cc +++ b/shell/browser/zoom_level_delegate.cc @@ -9,6 +9,7 @@ #include #include "base/bind.h" +#include "base/files/file_path.h" #include "base/strings/string_number_conversions.h" #include "base/values.h" #include "components/prefs/json_pref_store.h" diff --git a/shell/browser/zoom_level_delegate.h b/shell/browser/zoom_level_delegate.h index 773cf10c7d..4d6b1051d4 100644 --- a/shell/browser/zoom_level_delegate.h +++ b/shell/browser/zoom_level_delegate.h @@ -7,7 +7,6 @@ #include -#include "base/files/file_path.h" #include "base/macros.h" #include "components/prefs/pref_service.h" #include "content/public/browser/host_zoom_map.h" @@ -15,7 +14,8 @@ namespace base { class DictionaryValue; -} +class FilePath; +} // namespace base class PrefRegistrySimple; diff --git a/shell/common/api/electron_api_native_image_win.cc b/shell/common/api/electron_api_native_image_win.cc index 7220e7fecb..b77a049226 100644 --- a/shell/common/api/electron_api_native_image_win.cc +++ b/shell/common/api/electron_api_native_image_win.cc @@ -12,7 +12,9 @@ #include "shell/common/gin_converters/image_converter.h" #include "shell/common/gin_helper/promise.h" #include "shell/common/skia_util.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/icon_util.h" +#include "ui/gfx/image/image_skia.h" namespace electron { diff --git a/shell/common/extensions/electron_extensions_client.h b/shell/common/extensions/electron_extensions_client.h index dac734bc89..6d124028e2 100644 --- a/shell/common/extensions/electron_extensions_client.h +++ b/shell/common/extensions/electron_extensions_client.h @@ -17,7 +17,6 @@ class APIPermissionSet; class Extension; class PermissionMessageProvider; class PermissionIDSet; -class ScriptingWhitelist; class URLPatternSet; } // namespace extensions diff --git a/shell/common/gin_converters/blink_converter.h b/shell/common/gin_converters/blink_converter.h index b48f820cea..1330802f0d 100644 --- a/shell/common/gin_converters/blink_converter.h +++ b/shell/common/gin_converters/blink_converter.h @@ -17,7 +17,6 @@ class WebMouseEvent; class WebMouseWheelEvent; class WebKeyboardEvent; struct DeviceEmulationParams; -struct WebSize; } // namespace blink namespace gin { diff --git a/shell/common/gin_converters/extension_converter.h b/shell/common/gin_converters/extension_converter.h index e108e54f72..e0d566f680 100644 --- a/shell/common/gin_converters/extension_converter.h +++ b/shell/common/gin_converters/extension_converter.h @@ -11,7 +11,7 @@ namespace extensions { class Extension; -} // namespace extensions +} namespace gin { diff --git a/shell/common/gin_converters/frame_converter.h b/shell/common/gin_converters/frame_converter.h index 3a500dae89..4916054175 100644 --- a/shell/common/gin_converters/frame_converter.h +++ b/shell/common/gin_converters/frame_converter.h @@ -9,7 +9,7 @@ namespace content { class RenderFrameHost; -} // namespace content +} namespace gin { diff --git a/shell/common/gin_converters/net_converter.h b/shell/common/gin_converters/net_converter.h index a90e3dd90e..2341202e1b 100644 --- a/shell/common/gin_converters/net_converter.h +++ b/shell/common/gin_converters/net_converter.h @@ -13,14 +13,8 @@ #include "services/network/public/mojom/fetch_api.mojom.h" #include "shell/browser/net/cert_verifier_client.h" -namespace base { -class DictionaryValue; -class ListValue; -} // namespace base - namespace net { class AuthChallengeInfo; -class URLRequest; class X509Certificate; class HttpResponseHeaders; struct CertPrincipal; diff --git a/shell/common/gin_helper/wrappable_base.h b/shell/common/gin_helper/wrappable_base.h index 4ac145edf4..4b70a91fa2 100644 --- a/shell/common/gin_helper/wrappable_base.h +++ b/shell/common/gin_helper/wrappable_base.h @@ -9,7 +9,7 @@ namespace gin { class Arguments; -} // namespace gin +} namespace gin_helper { diff --git a/shell/common/heap_snapshot.cc b/shell/common/heap_snapshot.cc index a0148eea9b..2f416e6413 100644 --- a/shell/common/heap_snapshot.cc +++ b/shell/common/heap_snapshot.cc @@ -4,7 +4,9 @@ #include "shell/common/heap_snapshot.h" +#include "base/files/file.h" #include "v8/include/v8-profiler.h" +#include "v8/include/v8.h" namespace { diff --git a/shell/common/heap_snapshot.h b/shell/common/heap_snapshot.h index 81712ae3a4..ef544aa053 100644 --- a/shell/common/heap_snapshot.h +++ b/shell/common/heap_snapshot.h @@ -5,8 +5,13 @@ #ifndef SHELL_COMMON_HEAP_SNAPSHOT_H_ #define SHELL_COMMON_HEAP_SNAPSHOT_H_ -#include "base/files/file.h" -#include "v8/include/v8.h" +namespace base { +class File; +} + +namespace v8 { +class Isolate; +} namespace electron { diff --git a/shell/common/node_bindings.cc b/shell/common/node_bindings.cc index e1c6634306..6ff87e7962 100644 --- a/shell/common/node_bindings.cc +++ b/shell/common/node_bindings.cc @@ -17,6 +17,7 @@ #include "base/environment.h" #include "base/path_service.h" #include "base/run_loop.h" +#include "base/single_thread_task_runner.h" #include "base/strings/string_split.h" #include "base/strings/utf_string_conversions.h" #include "base/threading/thread_task_runner_handle.h" diff --git a/shell/common/node_bindings.h b/shell/common/node_bindings.h index 3af029e387..4cbc888b37 100644 --- a/shell/common/node_bindings.h +++ b/shell/common/node_bindings.h @@ -10,12 +10,11 @@ #include "base/files/file_path.h" #include "base/macros.h" #include "base/memory/weak_ptr.h" -#include "base/single_thread_task_runner.h" #include "uv.h" // NOLINT(build/include_directory) #include "v8/include/v8.h" namespace base { -class MessageLoop; +class SingleThreadTaskRunner; } namespace node { diff --git a/shell/common/node_util.h b/shell/common/node_util.h index 4db7d80092..a27f224918 100644 --- a/shell/common/node_util.h +++ b/shell/common/node_util.h @@ -11,7 +11,7 @@ namespace node { class Environment; -} // namespace node +} namespace electron { diff --git a/shell/common/process_util.cc b/shell/common/process_util.cc index 862363e544..c253af58fc 100644 --- a/shell/common/process_util.cc +++ b/shell/common/process_util.cc @@ -6,6 +6,7 @@ #include "gin/dictionary.h" #include "shell/common/gin_converters/callback_converter.h" +#include "shell/common/node_includes.h" namespace electron { diff --git a/shell/common/process_util.h b/shell/common/process_util.h index 6d8584e528..e66430758c 100644 --- a/shell/common/process_util.h +++ b/shell/common/process_util.h @@ -7,7 +7,9 @@ #include -#include "shell/common/node_includes.h" +namespace node { +class Environment; +} namespace electron { diff --git a/shell/common/skia_util.cc b/shell/common/skia_util.cc index ac260fbf72..ad0d8c00c9 100644 --- a/shell/common/skia_util.cc +++ b/shell/common/skia_util.cc @@ -4,6 +4,7 @@ #include +#include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/strings/pattern.h" #include "base/strings/string_util.h" diff --git a/shell/common/skia_util.h b/shell/common/skia_util.h index 720cebdcea..2c21b40f9b 100644 --- a/shell/common/skia_util.h +++ b/shell/common/skia_util.h @@ -5,7 +5,13 @@ #ifndef SHELL_COMMON_SKIA_UTIL_H_ #define SHELL_COMMON_SKIA_UTIL_H_ -#include "ui/gfx/image/image_skia.h" +namespace base { +class FilePath; +} + +namespace gfx { +class ImageSkia; +} namespace electron { diff --git a/shell/renderer/browser_exposed_renderer_interfaces.h b/shell/renderer/browser_exposed_renderer_interfaces.h index a35745e7b4..97e32ba768 100644 --- a/shell/renderer/browser_exposed_renderer_interfaces.h +++ b/shell/renderer/browser_exposed_renderer_interfaces.h @@ -7,11 +7,11 @@ namespace mojo { class BinderMap; -} // namespace mojo +} namespace electron { class RendererClientBase; -} // namespace electron +} class ChromeContentRendererClient; diff --git a/shell/renderer/electron_render_frame_observer.cc b/shell/renderer/electron_render_frame_observer.cc index 9b928f427a..0f10e16fed 100644 --- a/shell/renderer/electron_render_frame_observer.cc +++ b/shell/renderer/electron_render_frame_observer.cc @@ -21,6 +21,7 @@ #include "shell/common/gin_helper/microtasks_scope.h" #include "shell/common/options_switches.h" #include "shell/common/world_ids.h" +#include "shell/renderer/renderer_client_base.h" #include "third_party/blink/public/common/browser_interface_broker_proxy.h" #include "third_party/blink/public/common/web_preferences/web_preferences.h" #include "third_party/blink/public/platform/web_isolated_world_info.h" diff --git a/shell/renderer/electron_render_frame_observer.h b/shell/renderer/electron_render_frame_observer.h index 03f0b82397..5366bf256e 100644 --- a/shell/renderer/electron_render_frame_observer.h +++ b/shell/renderer/electron_render_frame_observer.h @@ -9,15 +9,12 @@ #include "content/public/renderer/render_frame_observer.h" #include "ipc/ipc_platform_file.h" -#include "shell/renderer/renderer_client_base.h" #include "third_party/blink/public/web/web_local_frame.h" -namespace base { -class ListValue; -} - namespace electron { +class RendererClientBase; + // Helper class to forward the messages to the client. class ElectronRenderFrameObserver : public content::RenderFrameObserver { public: diff --git a/shell/renderer/electron_renderer_client.h b/shell/renderer/electron_renderer_client.h index 2ecee5ba4c..9b2f2e591d 100644 --- a/shell/renderer/electron_renderer_client.h +++ b/shell/renderer/electron_renderer_client.h @@ -13,7 +13,7 @@ namespace node { class Environment; -} // namespace node +} namespace electron { diff --git a/shell/renderer/electron_sandboxed_renderer_client.cc b/shell/renderer/electron_sandboxed_renderer_client.cc index e31221f3b3..dcd7481154 100644 --- a/shell/renderer/electron_sandboxed_renderer_client.cc +++ b/shell/renderer/electron_sandboxed_renderer_client.cc @@ -11,6 +11,7 @@ #include "base/files/file_path.h" #include "base/path_service.h" #include "base/process/process_handle.h" +#include "base/process/process_metrics.h" #include "content/public/renderer/render_frame.h" #include "electron/buildflags/buildflags.h" #include "shell/common/api/electron_bindings.h" diff --git a/shell/renderer/electron_sandboxed_renderer_client.h b/shell/renderer/electron_sandboxed_renderer_client.h index fe739eb29e..8d81b89ff1 100644 --- a/shell/renderer/electron_sandboxed_renderer_client.h +++ b/shell/renderer/electron_sandboxed_renderer_client.h @@ -8,9 +8,16 @@ #include #include -#include "base/process/process_metrics.h" #include "shell/renderer/renderer_client_base.h" +namespace base { +class ProcessMetrics; +} + +namespace blink { +class WebLocalFrame; +} + namespace electron { class ElectronSandboxedRendererClient : public RendererClientBase { diff --git a/shell/renderer/guest_view_container.cc b/shell/renderer/guest_view_container.cc index 770c378734..07c2ec81da 100644 --- a/shell/renderer/guest_view_container.cc +++ b/shell/renderer/guest_view_container.cc @@ -10,6 +10,7 @@ #include "base/bind.h" #include "base/lazy_instance.h" #include "base/threading/thread_task_runner_handle.h" +#include "content/public/renderer/render_frame.h" #include "ui/gfx/geometry/size.h" namespace electron { diff --git a/shell/renderer/guest_view_container.h b/shell/renderer/guest_view_container.h index 7b34a97fc5..a8eb00a112 100644 --- a/shell/renderer/guest_view_container.h +++ b/shell/renderer/guest_view_container.h @@ -6,7 +6,10 @@ #define SHELL_RENDERER_GUEST_VIEW_CONTAINER_H_ #include "base/callback.h" -#include "content/public/renderer/render_frame.h" + +namespace content { +class RenderFrame; +} namespace gfx { class Size; diff --git a/shell/renderer/renderer_client_base.cc b/shell/renderer/renderer_client_base.cc index 38f0f613c3..1ea7889605 100644 --- a/shell/renderer/renderer_client_base.cc +++ b/shell/renderer/renderer_client_base.cc @@ -41,6 +41,7 @@ #include "third_party/blink/public/web/blink.h" #include "third_party/blink/public/web/web_custom_element.h" // NOLINT(build/include_alpha) #include "third_party/blink/public/web/web_frame_widget.h" +#include "third_party/blink/public/web/web_local_frame.h" #include "third_party/blink/public/web/web_plugin_params.h" #include "third_party/blink/public/web/web_script_source.h" #include "third_party/blink/public/web/web_security_policy.h" diff --git a/shell/renderer/renderer_client_base.h b/shell/renderer/renderer_client_base.h index b2c5f9602e..904b43e9db 100644 --- a/shell/renderer/renderer_client_base.h +++ b/shell/renderer/renderer_client_base.h @@ -13,7 +13,6 @@ #include "electron/buildflags/buildflags.h" #include "printing/buildflags/buildflags.h" #include "shell/common/gin_helper/dictionary.h" -#include "third_party/blink/public/web/web_local_frame.h" // In SHARED_INTERMEDIATE_DIR. #include "widevine_cdm_version.h" // NOLINT(build/include_directory) @@ -32,19 +31,18 @@ class SpellCheck; #endif +namespace blink { +class WebLocalFrame; +} + #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) namespace extensions { class ExtensionsClient; } -namespace content { -struct WebPluginInfo; -} #endif namespace electron { -class ElectronApiServiceImpl; - #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) class ElectronExtensionsRendererClient; #endif diff --git a/shell/utility/electron_content_utility_client.h b/shell/utility/electron_content_utility_client.h index 5dd21be77d..ca057de441 100644 --- a/shell/utility/electron_content_utility_client.h +++ b/shell/utility/electron_content_utility_client.h @@ -18,7 +18,7 @@ class PrintingHandler; namespace mojo { class ServiceFactory; -} // namespace mojo +} namespace electron {